This is my model
enter image description here
This is my Controller
enter image description here
This is my Route
Route::post('consultation_form', [ConsultationController::class,'addConsultation']);
This is my model
enter image description here
This is my Controller
enter image description here
This is my Route
Route::post('consultation_form', [ConsultationController::class,'addConsultation']);
2
Answers
This means your not providing a value for the item_name field when you are trying to insert a record for the consultation model.
The input being provided is most likely empty, and MYSQL is giving you an error because your database wasn’t setup for that field to have a default value when one isn’t provided.
Put
Or if you want a default name.