I am using the Laravel framework and the blade templating engine for one of my projects, where I have a route which looks like
Route::get('/problems/{problem-id}/edit', 'AdminController@editProblem');
I have editProblem method in AdminController which returns a view
public function editProblem(Problem $problem) {
return view('admin.problem-edit', compact('problem'));
}
and I have a button on a view which looks like
<button class="btn btn-xs btn-info pull-right">Edit</button>
Now I want to call this route with the $problem->id
when the button will be clicked. I need to pass these value on the route.
how can I do that?