I'm trying to get a value of the parameter in to a variable this is what I have so far:
public function getname(Request $request)
{
echo ($request->input('id'));
return view('test.test1');
}
and my route is:
Route::get('/test/{id}','Controller@getname');
the output I get is NULL
how can I get the value of the url parameter?
my url is:
localhost/test/test1/4
so I want 4 to be outputed.
I tried doing thr request method but didn't work so it's not the same as Passing page URL parameter to controller in Laravel 5.2