php artisan admin:install
运行这个命令的时候,如果遇到了下面的错误:
SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 1000 bytes (SQL: alter table
usersadd unique
users_email_unique(
email))
在app\Providers\AppServiceProvider.php添加默认值
<?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() { // } }