很坑爹的一个玩意,
找到config\database.php中的mysql配置 'strict' => true,把它改为false

'mysql' => [
            'driver' => 'mysql',
            'host' => env('DB_HOST', '127.0.0.1'),
            'port' => env('DB_PORT', '3306'),
            'database' => env('DB_DATABASE', 'test'),
            'username' => env('DB_USERNAME', 'root'),
            'password' => env('DB_PASSWORD', '123456'),
            'unix_socket' => env('DB_SOCKET', ''),
            'charset' => 'utf8mb4',
            'collation' => 'utf8mb4_unicode_ci',
            'prefix' => '',
            'strict' => true,
            'engine' => null,
        ],

相关文章:

  • 2022-12-23
  • 2021-11-17
  • 2021-06-01
  • 2021-12-18
  • 2021-11-30
  • 2021-07-18
  • 2022-12-23
  • 2021-05-18
猜你喜欢
  • 2021-06-17
  • 2022-12-23
  • 2022-12-23
  • 2021-11-27
  • 2022-12-23
  • 2021-09-14
  • 2021-10-25
相关资源
相似解决方案