How to update null in mySQL using Laravel How to update null in mySQL using Laravel laravel laravel

How to update null in mySQL using Laravel


This error is because to interger value. integer cannot store null value if not set as null yes in database meaning if not set null mysql will check that need to be insert value but null value is not a interger type.


As xenon states, the default expectation is that you will either define integer fields as nullable within your database, or provide a valid numeric value upon saving.

However, it is possible to override this behavior if you disable 'strict' mode in your database configuration file.

/config/database.php

'mysql' => [    ...    'strict' => false,    ...],