laravel分組中的路由要存取分組外面的控制器怎麼辦?
例如下面的路由:
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
});
分組中的SettingsController那條路由本來就是要存取外面的SettingsController,要怎麼寫才可以?
單獨把那天規則移出分組