When I pass the two ends up bugging the other and vice versa.
Example:
Route::get('/psicologo/editar/{psi_codigo}','PsicologoControlador@edit');
Route::get('/psicologo/editar/{psi_codigo}','ControladorMunicipioUf@ListaUfEditar');
How to solve?
When I pass the two ends up bugging the other and vice versa.
Example:
Route::get('/psicologo/editar/{psi_codigo}','PsicologoControlador@edit');
Route::get('/psicologo/editar/{psi_codigo}','ControladorMunicipioUf@ListaUfEditar');
How to solve?
You can not write the same route to two or more controller
and métodos
different. Each route that is configured is also unique within the project, but different from that you can write several different routes for the same controller
and method, example :
This works:
Route::get('/psicologo/busca/{psi_codigo}','PsicologoControlador@edit');
Route::get('/psicologo/filter/{psi_codigo}','PsicologoControlador@edit');
Because different routes are pointed to the same controller
and method.
Does not work
Route::get('/psicologo/editar/{psi_codigo}','PsicologoControlador@edit');
Route::get('/psicologo/editar/{psi_codigo}','ControladorMunicipioUf@ListaUfEditar');
Because the routes are equal (and should be unique) pointing to several controllers
and methods.
In short: Each route is unique in your project, where repeating routes causes the project to only run one.