laravel5.4 报错

artisan

问题:
	Syntax error or access violation: 1071 Specified key was too long; max key length is 1000 bytes 
解决:手动配置迁移命令migrate生成的默认字符串长度
	在app\Providers\appServiceProvider.php 中添加 Schema::defaultStringLength(191);
	use Illuminate\Support\Facades\Schema;
    public function boot()
    {
       Schema::defaultStringLength(191);
    }

你可能感兴趣的:(laravel,laravel5.4)