$product = new Product([
'productName' => $request->productName,
'quantity' => $request->quantity,
'weight' => $request->weight,
'boxes' => $request->boxes,
'MRP' => $request->MRP,
'costprice' =>$request->costprice,
'productDescription' =>$request->productDescription,
'seller_id' => $request->user('seller')->id,
'category_id' => $request->category
]);
$product->save();
I have provided values to the product table but still it is showing this error SQLSTATE[HY000]: General error: 1364 Field 'seller_id' doesn't have a default value (SQL: insert into
products
(updated_at
,created_at
) values (2021-12-30 13:35:47, 2021-12-30 13:35:47))