I have the following structure in the routes:
Route::group(['prefix' => 'ventas', 'as' => 'ventas.'], function () {
//INICIO
Route::group(['namespace' => 'Inicio'], function() {
Route::get('inicio', [
'as' => 'inicio',
'uses' => 'InicioController@index'
]);
});
});
and in the view I call this route like this: href="{{route('ventas.inicio')}}"
Now if I want to add the Route :: resource instead of the previous one, that same route does not work for me.
Route::group(['prefix' => 'ventas', 'as' => 'ventas.'], function () {
//INICIO
Route::group(['namespace' => 'Inicio'], function() {
Route::resource('inicio', 'InicioController');
});
});