I need to pass a variable from a route to a controller method.
The route:
Route::get('busca/{id}', 'MatriculasController@busca');
How can I pass the id
variable to the method?
I need to pass a variable from a route to a controller method.
The route:
Route::get('busca/{id}', 'MatriculasController@busca');
How can I pass the id
variable to the method?
You use as a parameter, slug
of your method.
public function busca($id){
dd($id);
}