SQLSTATE[HY000]: General error: 1364 Field ‘phone’ doesn’t have a default value (SQL: insert into `products` (`name`, `email`, `address`, `image`, `updated_at`, `created_at`) values (amti, firstname.lastname@example.org, sdafasdf, 642917381.jpg, 2021–05–11 10:58:35, 2021–05–11 10:58:35))
When I’m submit form then got General error field doesn’t have default value. let’s go to solve this.
👉 1 step go to your database and put change none>to Null and save.
Lets go to phpmyadmin
👉 Click on Structure
Click on change and change all field to None to Null and save
Set Null and click on save button
👁👁 Now its error has been solved and your data has been stored successfully.
- Multi File upload with Image preview and checklist delete options - June 19, 2021
- How to Upload Multiple Image in Laravel - June 13, 2021
- How to Add Google reCAPTCHA on Register page and login page in Laravel - June 11, 2021