i want to get id form url and use it as a foreign key to put it in table in database
when i do it like that a got an error that tour_id column is embty
public function addtour(Request $request,$id) {
$form_data = array(
'user_id' => $request->input("user_id",auth::user()->id),
'tour_id' => $request->input("tour_id",$id),
);
tecket::create($form_data);
return view('submit_tour');
}
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…