I have a small problem with an exception, which is with a route, for example.
I have this route, which loads well.
but if I make a change like this.
I'm loading an error
Now, in the other modules and routes, if I make changes like these, I load the exception, but I do not understand why this route does not.
I point out the route with which I have the problem.
My method.
/**
*
* @param \Illuminate\Http\Request $request
* @return \Illuminate\Http\Response
*/
public function create(Request $request)
{
$request->user()->authorizeRoles(['admin']);
return view('usuario.create');
}
Route file
<?php
/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/
Route::get('/panel', 'PanelController@index');
Route::get('/panel/filtusuario', 'CuentaController@filtusuario')->name('usuario.filtusuario');
Route::post('/panel/gestion', 'CuentaController@ugestion')->name('usuario.ugestion');
Route::post('/panel/bestado', 'CuentaController@bestado')->name('usuario.bestado');
Route::post('/panel/selectord', 'CuentaController@selectord')->name('usuario.selectord');
Route::get('/panel/revisar', 'CuentaController@revisar')->name('cuenta.revisar');
Route::post('/panel/estado', 'CuentaController@cestado')->name('cuenta.cestado');
Route::post('/panel/asignar', 'CuentaController@asignar')->name('cuenta.asignar');
Route::get('/panel/tareas', 'CuentaController@tareas')->name('cuenta.tareas');
Route::get('/panel/inactivo', 'CuentaController@inactivo')->name('cuenta.inactivo');
Route::get('/panel/reportes', 'CuentaController@reportes')->name('cuenta.reportes');
Route::resource('/panel/ecuentas', 'CuentaController');
Route::resource('/panel/registros', 'RegistrosController');
Route::get('/panel/fecha', 'UsuarioController@fecha')->name('usuario.fecha');
Route::post('/panel/selector', 'UsuarioController@selector')->name('usuario.selector');
Route::post('/panel/cedula', 'UsuarioController@cedula')->name('usuario.cedula');
Route::resource('/panel/usuario', 'UsuarioController');
Auth::routes();
The route is updated to exclude the show method, but now this appears.
I give an example, with a route that works for me, for example I have this one.
which I'm calling with this route, user.index, is also a method of UserController, and if I do this.
link , upload this to me
It is also a resource type method, and it works well, it is assumed that the other route should work the same, but I do not know what happens.