在 app\Providers\AppServiceProvider.php 中调用 Schema::defaultStringLength 方法
public function boot()
{
\Illuminate\Support\Facades\Schema::defaultStringLength(191);
}
改配置文件里的文字编码格式为
'charset' => 'utf8',
'collation' => 'utf8_unicode_ci',
在 app\Providers\AppServiceProvider.php 中调用 Schema::defaultStringLength 方法
public function boot()
{
\Illuminate\Support\Facades\Schema::defaultStringLength(191);
}
改配置文件里的文字编码格式为
'charset' => 'utf8',
'collation' => 'utf8_unicode_ci',