SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'product_id' cannot be null (SQL: insert into `cart` (`user_id`, `product_id`, `updated_at`, `created_at`) values (1, ?, 2021-01-26 05:05:05, 2021-01-26 05:05:05)) code example

Example: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'image' cannot be null (SQL: update `logins` set `name` = testdata, `image` = ?, `logins`.`updated_at` = 2020-12-22 11:29:55 where `id` = 48)

//dd($request->all());


    $user=User::create([
            'name'=>$request->name,
           'email'=>$request->email,
         'password'=>bcrypt('password')
    ]);

     $profile=Profile::create([

Tags:

Sql Example