laravel 下安装laravel-admin爬过的坑汇总
SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long
解决方法:
在app\Providers\AppServiceProvider下的boot方法下添加如下语句:
public function boot() {
Schema::defaultStringLength(191); //Solved by increasing StringLength
}
再次运行php artisan admin:install 命令时报错:
Class 'App\Providers\Schema' not found
解决方法:
在app\Providers\AppServiceProvider下引入"use Illuminate\Support\Facades\Schema;"