We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
In Laravel v 5.3 saving an item with a checkbox fails when leaving the checkbox empty because the database column does not allow nullable values.
On the storeCRUD and updateCRUD in the CrudController we need to change the code that is changing empty (also '0' string) to null.
So we need to go from:
if (empty($value)) { $request->request->set($key, null); }
to
if (empty($value) && $value !== '0') { $request->request->set($key, null); }
Note: I have tested this only on MySQL, and not on other databases, but I don't think this should cause issues.
The text was updated successfully, but these errors were encountered:
df819f8
You're totally right, @timdiels1
Thanks for the fix, I've implemented it.
Cheers to you! Keep 'em coming!
Sorry, something went wrong.
No branches or pull requests
Bug Description
In Laravel v 5.3 saving an item with a checkbox fails when leaving the checkbox empty because the database column does not allow nullable values.
Fix
On the storeCRUD and updateCRUD in the CrudController we need to change the code that is changing empty (also '0' string) to null.
So we need to go from:
to
Note: I have tested this only on MySQL, and not on other databases, but I don't think this should cause issues.
The text was updated successfully, but these errors were encountered: