Level 73
Check in your Booking model if you have your event_id in your $fillable array.
protected $fillable = ['user_id', 'event_id', 'hall_id', 'package_id'];
1 like
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
While I'm creating a new entry to my database only one field not accepting value from Request class.
$booking = Booking::create([
'user_id' => $request->user_id,
'event_id' => $request->event_id,
'hall_id' => $request->hall_id,
'package_id' => $request->package_id,
]);
Here event_id not accepting the value from $request->event_id. When I dd() the $request it having the value.
dd($request) output
"user_id" => "1"
"event_id" => "5"
"hall_id" => "5"
"package_id" => "1"
What i'm missing?
Check in your Booking model if you have your event_id in your $fillable array.
protected $fillable = ['user_id', 'event_id', 'hall_id', 'package_id'];
Please or to participate in this conversation.