创建索引的时候报错 :Index column size too large. The maximum column size is 767 bytes.
改数据库文件
default_storage_engine = InnoDB
innodb_large_prefix=on
innodb_file_format = BARRACUDA
alter table `表名` row_format=dynamic;
alter table `表名` row_format=compressed;
终极方法
在 App\Providers\AppServiceProvider 的 boot () 方法中添加
\Illuminate\Support\Facades\Schema::defaultStringLength(191);
即可
–mosou