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))

Amit Kumar
Nov 9, 2021

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 👍👍.

--

--

Amit Kumar

Hi I am Amit Experienced Web Developer with a demonstrated history of working in the information technology and services industry.