- Laravel 5.4之后版本如果遇到数据库迁移时某些字段太长的话会报错,这时只需在 App\Providers\AppServiceProvider 文件的 boot() 方法加入如下即可:
public function boot()
{
\Schema::defaultStringLength(191);
}
public function boot()
{
\Schema::defaultStringLength(191);
}