0
I have the following route of type Resource:
Route::group(['prefix' => 'processos' ,'namespace' => 'Processos', 'middleware' => 'processo_exists'], function () {
// Andamentos
Route::resource('{processo_id}/andamentos', 'AndamentosController');
});
When to access url:
site.com.br/processos/1/andamentos/9
The method show
receives a parameter $id
, only that it shows the process id (which is number 1), not 9, and the parameter name for the process is {processo_id}
, the $id
is not the default name for Resource?
Can’t be
resource
in this case, each method has to be configured for each route, and the name is the parameter that must be included in the method. Because actually Resource has a pattern and its route is not in the pattern.– novic