I want to pass the variable id from (the url is /xxxx/{{id}} )
to store
I have a modal box which opens a form. This info is then stored using the controller shown below:
I tried adding $id
to pass through the controller (the url is /xxxx/{{id}} )
OpenHome Controller
public function store(Request $request,$id)
$option = new Option;
$option->time = $request->input('time');
$option->date = $request->input('date');
$option->save();
return view('option.create');
ERROR: Type error: Too few arguments to function App\Http\Controllers\option::store(), 1 passed and exactly 2 expected
dd($request->all());
array:3 [▼
"_token" => "7O23EkldYOYj1d7Fc2xNflcPWMY67ytGTkrymy9g"
"time" => "00:12"
"date" => "12-05-1996"
]