Pass route variable to controller method

4

I need to pass a variable from a route to a controller method.

The route:

Route::get('busca/{id}', '[email protected]');

How can I pass the id variable to the method?

    
asked by anonymous 03.11.2015 / 16:35

1 answer

4

You use as a parameter, slug of your method.

MatriculasController.php

public function busca($id){

    dd($id);

}
    
03.11.2015 / 16:40