So Consider the following:
JavaScript
x
Route::middleware('web')
->namespace('AppModulesConfigControllers')
->group(function () {
Route::get('config', ['as' => 'config.index', 'uses' => 'Config@index']);
Route::put('config', ['as' => 'config.update', 'uses' => 'Config@update']);
Route::patch('config', 'Config@update');
});
This explodes when I hit any of these routes because:
JavaScript
Class AppHttpControllersAppModulesConfigControllersConfig does not exist
Is there not a way in laravel 5.6 to say: No I don’t want to use AppHttpControllers
I want to use the namespace I specified?
Advertisement
Answer
Try with a slash
->namespace('AppModulesConfigControllers')