Error Field doesn’t have a default value in laravel 5.3

You should add ->nullable() or ->default('somethingHere') to fields which you send empty values.

$table->string('family')->nullable(); //this means that if you send empty value this field will become MySQL NULL

Or set default value:

$table->string('family')->default('default value here');

Than remigrate:

php artisan migrate:rollback

and

php artisan migrate

Leave a Comment