1、在window环境变量中配置php运行版本
window下安装Laravel-admin

编辑环境变量中的path
window下安装Laravel-admin

把php安装路径加入到环境
变量中

2、安装composer

3、cmd进入网站的目录下
window下安装Laravel-admin

配置项目下的.cnv 中的mysql配置
window下安装Laravel-admin

运行命令: composer require encore/laravel-admin “1.5.*”

运行:php artisan vendor:publish –provider=”Encore\Admin\AdminServiceProvider”

安装 php artisan admin:install

在Nginx中配置改项目
window下安装Laravel-admin

访问后台:http://localhost:8005/admin/

账号:admin
密码:admin

注意警告:
在执行到 php artisan admin:install 出现以下错误
[Illuminate\Database\QueryException]
SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes (SQL: alter table users add unique users_email_unique(email))
[PDOException]
SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes

这是由于Laravel 默认使用 utf8mb4 字符, 包括支持在数据库存储「 表情」 。 如果你正在运行的 MySQL release 版本低于5.7.7 或 MariaDB release
版本低于10.2.2 , 为了MySQL为它们创建索引, 你可能需要手动配置迁移生成的默认字符串长度, 你可以通过调用 AppServiceProvider 中的
Schema::defaultStringLength 方法来配置它:\

解决办法,在红框处加下下面的代码
window下安装Laravel-admin

清除数据库表 执行
php artisan migrate 命令

再做 php artisan admin:install 命令执行

相关文章:

  • 2022-12-23
  • 2022-01-09
  • 2022-12-23
  • 2021-10-25
  • 2022-01-24
  • 2022-12-23
  • 2021-12-15
  • 2022-12-23
猜你喜欢
  • 2022-01-26
  • 2022-12-23
  • 2021-12-14
  • 2021-04-19
  • 2021-04-10
  • 2021-08-18
相关资源
相似解决方案