Laravel 5.3 Creating Models Returns “Field doesn't have a default value”

前端 未结 2 1185
独厮守ぢ
独厮守ぢ 2021-01-01 19:40

I\'m using Laravel and Eloquent for two years and today I\'ve decided to install a fresh Laravel 5.3 and try something with it.

I used an old database schema of mine

2条回答
  •  梦毁少年i
    2021-01-01 20:04

    The reason for the error has been explained by @Nicklas.

    The reason this is happening now, however, is that Laravel 5.3 uses strict mode for MySQL by default.

    If you would like to revert to previous behavior, update your config/database.php file and set 'strict' => false for your connection.

提交回复
热议问题