search

Home  >  Q&A  >  body text

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

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?

漂亮男人漂亮男人2747 days ago417

reply all(1)I'll reply

  • 黄舟

    黄舟2017-05-16 16:48:35

    Remove that day’s rules individually from the group

    reply
    0
  • Cancelreply