Home > Article > PHP Framework > How to solve the problem that laravel converts empty values to null by default
The main content of this article is about solving the problem of laravel converting empty values to null by default. Interested friends can learn more.
If the field we submit during form submission is an empty string, it will be automatically escaped to Null in Laravel.
How to deal with this problem until you find the middleware\vendor\laravel\framework\src\Illuminate\Foundation\Http\Middleware\<span class="token class-name">ConvertEmptyStringsToNull </span>
Comment out the conversion operation
Related tutorials: laravel video tutorial
The above is the detailed content of How to solve the problem that laravel converts empty values to null by default. For more information, please follow other related articles on the PHP Chinese website!