Home > PHP Framework > Laravel > How to solve the problem that laravel converts empty values ​​​​to null by default

How to solve the problem that laravel converts empty values ​​​​to null by default

little bottle
Release: 2019-04-22 11:43:09
forward
5620 people have browsed it

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!

Related labels:
source:cnblogs.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template