Level 70
You better use ``` before and after your code block.
Your code is not readable.
2 likes
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hi. How change status from 1 to 0 in table seats when i do reservation and choose a seat from this table and insert in table booking?
All the seats is in a separate table. I call this seats with ajax when choose the date for trip. All the seats show depend what date i choose.This is in view.
public function bookingForm ( Request $request){
foreach ($request->addperson as $key => $value) {
BookingNow::create([
'route_id' => $value['route_id'],
'user_id'=> $user_id = auth()->user()->id,
'name' => $value['name'],
'description' => $value['description'],
'seat_no' => $value['seat_no'],
'phone' => $value['phone'],
'email' => $value['email'],
'date' => $value['date'],
'hour' => $value['hour'],
'stationroute' => $value['stationroute'],
'pricestation' => $value['pricestation'],
]);
}
Session::flash('success','Rezervarea a fost adaugat cu success');
return redirect()->back();
}
Please or to participate in this conversation.