laravel-admin安装的时候运行php artisan admin:install命令报错SQLSTATE[42000]: Syntax error or access violation:

错误如下所示:

laravel-admin安装的时候运行php artisan admin:install命令报错SQLSTATE[42000]: Syntax error or access violation:

 

 

 首先删除已经创建的两张表,然后在app\Providers\AppServiceProvider.php文件中boot方法中增加默认值,别忘记引入

Schema类
<?php

namespace App\Providers;

use Illuminate\Support\ServiceProvider;
use Illuminate\Support\Facades\Schema; //add fixed sql

class AppServiceProvider extends ServiceProvider
{
    /**
     * Bootstrap any application services.
     *
     * @return void
     */
    public function boot()
    {
        Schema::defaultStringLength(191); //add fixed sql
    }

    /**
     * Register any application services.
     *
     * @return void
     */
    public function register()
    {
        //
    }
}
之后运行 php artisan admin:install 命令
安装成功
成功如图所示
laravel-admin安装的时候运行php artisan admin:install命令报错SQLSTATE[42000]: Syntax error or access violation:

 

 

 
上一篇:Redis进阶-Stream多播的可持久化的消息队列


下一篇:Redis进阶-List底层数据结构精讲