SQLSTATE[23000]: Integrity constraint violation: 1048 Column ‘name’ cannot be null (SQL: insert into `categories` (`name`, `slug`, `updated_at`, `created_at`) values (?, , 2021–11–09 00:58:24, 2021–11–09 00:58:24))

In this tutorial im going to solve SQLSTATE[23000]: Integrity constraint violation: 1048 Column ‘name’ cannot be null.

Let’s go to create.blade.php file and add name place.

<label for="name">Name</label>
<input type="text" id="inputname" name="title" class="form-control" placeholder="title" required>

Next check your controller once.

Now run your project, and submit data.

Now check your database.

Now data has been stored successfully. I hope it’s helpfull for you 👍👍.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store