What should I do if the route in the laravel group wants to access the controller outside the group?
漂亮男人
漂亮男人 2017-05-16 16:46:35
0
1
469

What should I do if the route in the laravel group wants to access the controller outside the group?

For example, the following route:

Route::get('/settings', 'SettingsController@index');
Route::group(['prefix' => 'user', 'namespace' => 'User', 'middleware' => ['auth', 'role:user']], function () {
    Route::resource('dashboard', 'DashboardController');
    Route::get('/settings', 'SettingsController@index'); //这里的本意是要访问外面的SettingsController
});

The route of SettingsController in the group is intended to access the external SettingsController. How to write it?

漂亮男人
漂亮男人

reply all(1)
黄舟

Remove that day’s rules individually from the group

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template