📌  相关文章
📜  SQLSTATE[42000]:语法错误或访问冲突:1071 指定的键太长;最大密钥长度为 1000 字节 - PHP 代码示例

📅  最后修改于: 2022-03-11 14:54:17.655000             🧑  作者: Mango

代码示例4
Path : App/Providers/AppServiceProvider

Schema::defaultStringLength(191);
in AppServiceProvider didn't work for me. What worked for was editing the database.php file in config folder. Just edit

'charset' => 'utf8mb4',
'collation' => 'utf8mb4_unicode_ci',
to

'charset' => 'utf8',
'collation' => 'utf8_unicode_ci',
and it should work, although you will be unable to store extended multibyte characters like emoji.