The following is an example from the documentation:
Route::group(['namespace' => 'Admin'], function(){
// 控制器在 "App\Http\Controllers\Admin" 命名空间下
Route::group(['namespace' => 'User'], function()
{
// 控制器在 "App\Http\Controllers\Admin\User" 命名空间下
});
});
Assume that there is an ArticleController under both the Admin and User namespaces. To access these two different controllers, how should the URL be written?
Just follow the form
Admin
改为AdminUser
即可如果User是一个目录的话,写成
AdminUserXXController
as shown aboveFor example: