当前位置: 首页>>代码示例>>PHP>>正文


PHP Router::group方法代码示例

本文整理汇总了PHP中Illuminate\Routing\Router::group方法的典型用法代码示例。如果您正苦于以下问题:PHP Router::group方法的具体用法?PHP Router::group怎么用?PHP Router::group使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Illuminate\Routing\Router的用法示例。


在下文中一共展示了Router::group方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: boot

 public function boot(Router $router)
 {
     $this->commands(Install::class);
     foreach ($this->routeMiddleware as $key => $middleware) {
         $router->middleware($key, $middleware);
     }
     $groupOptions = ['namespace' => $this->namespace];
     if (config('adminPanel.subDomain')) {
         $groupOptions['domain'] = config('adminPanel.routePrefix') . '.' . preg_replace("/^(.*?)\\.(.*)\$/", "\$2", \Request::server('SERVER_NAME'));
     } else {
         $groupOptions['prefix'] = config('adminPanel.routePrefix');
     }
     $router->group($groupOptions, function (Router $router) {
         $router->controller('auth', 'Auth\\AuthController', ['getRegister' => 'admin.register', 'getLogin' => 'admin.login', 'getLogout' => 'admin.logout']);
         $router->group(['middleware' => 'ap.permission', 'permission' => config('adminPanel.ap_permission')], function (Router $route) {
             $route->get('/', ['as' => 'admin.home', function () {
                 return view('adminPanel::hello');
             }]);
             $route->controller('ajax', 'AjaxController');
             $route->resource('user', 'UserController', ['as' => 'admin']);
             $route->model('role', config('entrust.role'));
             $route->resource('role', 'RoleController', ['as' => 'admin']);
             $route->model('permission', config('entrust.permission'));
             $route->resource('permission', 'PermissionController', ['as' => 'admin']);
         });
     });
     $this->loadViewsFrom(__DIR__ . '/../../resources/views', 'adminPanel');
     $this->publishes([__DIR__ . '/../../config/config.php' => config_path('adminPanel.php')], 'config');
     $this->publishes([__DIR__ . '/../../resources/assets' => base_path('resources/adminAssets')], 'assets');
     $this->publishes([__DIR__ . '/../../migrations' => base_path('database/migrations')], 'migrate');
 }
开发者ID:hramose,项目名称:Admin-Panel,代码行数:31,代码来源:AdminPanelServiceProvider.php

示例2: defineRoutes

 private function defineRoutes()
 {
     $this->router->group(['namespace' => "FileManager"], function () {
         $this->router->get('dashboard/filemanager', ['as' => 'filemanager.index', 'uses' => 'FileController@getFileManager']);
     });
     $this->router->group(['prefix' => "dashboard/file", 'namespace' => "FileManager"], function () {
         $this->router->model("file_id", File::class);
         $this->router->get('/', ['as' => 'file.all', 'uses' => 'FileController@getIndex']);
         $this->router->get('/get', ['as' => 'file.getFile', 'uses' => 'FileController@getFile']);
         $this->router->get('/add', ['as' => 'file.index', 'uses' => 'FileController@getFileAdd']);
         $this->router->get('/edit/{file_id}', ['as' => 'file.edit', 'uses' => 'FileController@getEdit']);
         $this->router->get('/manage', ['as' => 'file.manage', 'uses' => 'FileController@getManage']);
         $this->router->post('/edit/{file_id}', 'FileController@fileEdit');
         $this->router->post('/add', ['as' => 'file.add', 'uses' => 'FileController@postFileAdd']);
         $this->router->post('/delete', ['as' => 'file.delete', 'uses' => 'FileController@postDelete']);
         $this->router->get('/rename/{file_id}', ['as' => 'file.rename', 'uses' => 'FileController@getFileRename']);
         $this->router->post('/rename', ['as' => 'file.rename', 'uses' => 'FileController@postFileRename']);
         $this->router->get('/crop/{file_id}', ['as' => 'file.crop', 'uses' => 'FileController@getFileCrop']);
         $this->router->post('/crop/{file_id}', ['as' => 'file.crop', 'uses' => 'FileController@postFileCrop']);
         $this->router->post('/multiPost', ['as' => 'file.multipleFiles', 'uses' => 'FileController@postMultipleFiles']);
         $this->router->get('/list', ['as' => 'file.list', 'uses' => 'FileController@getList']);
     });
     $this->router->group(['prefix' => "dashboard/folder", 'namespace' => "FileManager"], function () {
         $this->router->model("folder_id", Folder::class);
         $this->router->get('/index', ['as' => 'folder.all', 'uses' => 'FolderController@getIndex']);
         $this->router->get('/add', ['as' => 'folder.add', 'uses' => 'FolderController@getFolderAdd']);
         $this->router->get('/edit/{folder_id}', ['as' => 'folder.edit', 'uses' => 'FolderController@getFolderEdit']);
         $this->router->get('/manage', ['as' => 'folder.manage', 'uses' => 'FolderController@getFolderManage']);
         $this->router->post('/delete', ['as' => 'folder.delete', 'uses' => 'FolderController@postDelete']);
         $this->router->post('/add', ['as' => 'folder.add', 'uses' => 'FolderController@postFolderAdd']);
         $this->router->post('/edit', ['as' => 'folder.rename', 'uses' => 'FolderController@postFolderRename']);
         $this->router->get('/list', ['as' => 'folder.list', 'uses' => 'FolderController@getList']);
     });
 }
开发者ID:PhonemeCms,项目名称:cms,代码行数:34,代码来源:FileManagerServiceProvider.php

示例3: defineRoutes

 private function defineRoutes()
 {
     $this->router->model("role_id", "UserManagement\\Role");
     $this->router->group(["prefix" => "/dashboard/user", "namespace" => "UserManagement"], function () {
         $this->router->get('role', ['as' => 'role.index', 'uses' => 'RoleController@index']);
         $this->router->get('role/create', ['as' => 'role.create', 'uses' => 'RoleController@create']);
         $this->router->post('role/create', ['as' => 'role.create.post', 'uses' => 'RoleController@postCreate']);
         $this->router->get('role/update/{role_id}', ['as' => 'role.update', 'uses' => 'RoleController@update']);
         $this->router->post('role/update/{role_id}', ['as' => 'role.update.post', 'uses' => 'RoleController@postUpdate']);
         $this->router->get('role/delete/{role_id}', ['as' => 'role.delete', 'uses' => 'RoleController@delete']);
         $this->router->get('permission/', ['as' => 'permission.index', 'uses' => 'PermissionController@index']);
         $this->router->model("user_id", "UserManagement\\UserModel");
         $this->router->get("/", ['as' => 'user.index', 'uses' => 'UserController@index']);
         $this->router->get("/create", ['as' => 'user.create', 'uses' => 'UserController@create']);
         $this->router->post("/create", ['as' => 'user.create.post', 'uses' => 'UserController@postCreate']);
         $this->router->get("/update/{user_id}", ['as' => 'user.update', 'uses' => 'UserController@update']);
         $this->router->post("/update/{user_id}", ['as' => 'user.update.post', 'uses' => 'UserController@postUpdate']);
         $this->router->get("/delete/{user_id}", ['as' => 'user.delete', 'uses' => 'UserController@delete']);
     });
     $this->router->group(["namespace" => "UserManagement"], function () {
         $this->router->get("/login", ['as' => 'login', 'uses' => 'UserController@login']);
         $this->router->post("/login", ['as' => 'login.post', 'uses' => 'UserController@postLogin']);
         $this->router->get("/logout", ['as' => 'logout', 'uses' => 'UserController@logout']);
         $this->router->get("/register", ['as' => 'register', 'uses' => 'UserController@register']);
         $this->router->post("/register", ['as' => 'register.post', 'uses' => 'UserController@postRegister']);
     });
 }
开发者ID:PhonemeCms,项目名称:cms,代码行数:27,代码来源:PermissionServiceProvider.php

示例4: map

 /**
  * Define the routes for the application.
  *
  * @param  \Illuminate\Routing\Router  $router
  * @return void
  */
 public function map(Router $router)
 {
     $router->group(['namespace' => $this->namespace], function ($router) {
         $router->group(['before' => 'ui|csfr', 'middleware' => 'theme'], function ($router) {
             // $router->get('session/start', array('as' => 'session.start', 'uses' => 'SessionController@getStart'));
             // $router->post('session/start', array('as' => 'session.post', 'uses' => 'SessionController@postStart'));
             $router->resource('session', 'SessionController', ['only' => ['store', 'create', 'index']]);
             $router->group(array('middleware' => 'auth'), function ($router) {
                 // $router->get('session/end', array('as' => 'session.end', 'uses' => 'SessionController@getEnd'));
                 $router->get('/', array('as' => 'dash.index', 'uses' => 'DashController@getIndex'));
                 $router->get('me/time', array('as' => 'me.time.index', 'uses' => 'TimeController@index'));
                 $router->post('me/time/store', array('as' => 'me.time.store', 'uses' => 'TimeController@store'));
                 $router->get('me/time/{id}/edit', array('as' => 'me.time.edit', 'uses' => 'TimeController@edit'));
                 $router->put('me/time/{id}', array('as' => 'me.time.update', 'uses' => 'TimeController@update'));
                 $router->get('me/time/{id}/delete', array('as' => 'me.time.delete', 'uses' => 'TimeController@delete'));
                 $router->delete('me/time/{id}', array('as' => 'me.time.destroy', 'uses' => 'TimeController@destroy'));
                 $router->resource('tickets', 'TicketsController', ['except' => ['destroy']]);
                 $router->resource('actions', 'TicketActionsController', ['only' => ['store']]);
                 $router->resource('reports', 'ReportsController', ['only' => ['index', 'show']]);
                 $router->resource('dev', 'DevController', ['only' => ['index']]);
             });
         });
         $router->group(['namespace' => 'Api', 'prefix' => 'api', 'before' => 'auth|csfr'], function ($router) {
             $router->resource('users', 'UsersController', ['except' => ['create', 'store', 'edit', 'update', 'destroy']]);
             $router->resource('tickets', 'TicketsController', ['except' => ['index', 'create', 'store', 'show', 'edit', 'destroy']]);
         });
     });
 }
开发者ID:vik0803,项目名称:nuticket,代码行数:34,代码来源:RouteServiceProvider.php

示例5: map

 public function map(Router $router)
 {
     // Index of Panel
     $router->get('/', ['as' => 'index', 'middleware' => 'auth', 'uses' => 'Base\\IndexController@getIndex']);
     // Handle Index. Redirect /index to /
     $router->get('/index', function () {
         return redirect()->route('index');
     });
     // Password Generation
     $router->get('/password-gen/{length}', ['as' => 'password-gen', 'middleware' => 'auth', 'uses' => 'Base\\IndexController@getPassword']);
     // Account Routes
     $router->group(['profix' => 'account', 'middleware' => ['auth', 'csrf']], function () use($router) {
         $router->get('account', ['as' => 'account', 'uses' => 'Base\\IndexController@getAccount']);
         $router->post('/account/password', ['uses' => 'Base\\IndexController@postAccountPassword']);
         $router->post('/account/email', ['uses' => 'Base\\IndexController@postAccountEmail']);
     });
     // TOTP Routes
     $router->group(['prefix' => 'account/security', 'middleware' => ['auth', 'csrf']], function () use($router) {
         $router->get('/', ['as' => 'account.security', 'uses' => 'Base\\IndexController@getAccountSecurity']);
         $router->get('/revoke/{id}', ['as' => 'account.security.revoke', 'uses' => 'Base\\IndexController@getRevokeSession']);
         $router->put('/', ['uses' => 'Base\\IndexController@putAccountTotp']);
         $router->post('/', ['uses' => 'Base\\IndexController@postAccountTotp']);
         $router->delete('/', ['uses' => 'Base\\IndexController@deleteAccountTotp']);
     });
 }
开发者ID:Pterodactyl,项目名称:Panel,代码行数:25,代码来源:BaseRoutes.php

示例6: boot

 public function boot(Router $router)
 {
     $this->commands(Install::class);
     foreach ($this->routeMiddleware as $key => $middleware) {
         $router->middleware($key, $middleware);
     }
     $router->group(['middleware' => ['web'], 'namespace' => $this->namespace, 'prefix' => config('adminPanel.routePrefix'), 'as' => 'admin.'], function (Router $router) {
         $router->get('auth/register', ['as' => 'register', 'uses' => 'Auth\\AuthController@getRegister']);
         $router->get('auth/login', ['as' => 'login', 'uses' => 'Auth\\AuthController@getLogin']);
         $router->post('auth/login', ['as' => 'login', 'uses' => 'Auth\\AuthController@postLogin']);
         $router->get('auth/logout', ['as' => 'logout', 'uses' => 'Auth\\AuthController@getLogout']);
         $router->group(['middleware' => ['role:admin']], function (Router $route) {
             $route->get('/', ['as' => 'home', function () {
                 return view('adminPanel::hello');
             }]);
             //
             ////                $route->controller('ajax', 'AjaxController');
             //
             //                $route->resource('user', 'UserController', ['as' => 'admin']);
             //
             //                $route->model('role', config('entrust.role'));
             //                $route->resource('role', 'RoleController', ['as' => 'admin']);
             //
             //                $route->model('permission', config('entrust.permission'));
             //                $route->resource('permission', 'PermissionController', ['as' => 'admin']);
         });
     });
     $this->loadViewsFrom(__DIR__ . '/../../resources/views', 'adminPanel');
     $this->publishes([__DIR__ . '/../../config/config.php' => config_path('adminPanel.php')], 'config');
     $this->publishes([__DIR__ . '/../../resources/assets' => base_path('resources/adminAssets')], 'assets');
     $this->publishes([__DIR__ . '/../../migrations' => base_path('database/migrations')], 'migrate');
 }
开发者ID:cinject,项目名称:admin-panel,代码行数:32,代码来源:AdminPanelServiceProvider.php

示例7: defineRoutes

 private function defineRoutes()
 {
     $this->router->group(['prefix' => '/dashboard/setting', 'namespace' => 'Settings'], function () {
         $this->router->get("/", ['as' => 'setting.index', 'uses' => 'SettingsController@index']);
         $this->router->post("/", ['as' => 'setting.post', 'uses' => 'SettingsController@postSetting']);
     });
 }
开发者ID:hasangilak,项目名称:PhonemeSettings,代码行数:7,代码来源:SettingsServiceProvider.php

示例8: boot

 /**
  * Define your route model bindings, pattern filters, etc.
  *
  * @param    \Illuminate\Routing\Router  $router
  * @return  void
  */
 public function boot(Router $router)
 {
     //============
     //== ASSETS ==
     //============
     $this->loadViewsFrom(__DIR__ . '/../resources/views', static::PACKAGE_NAME);
     $this->publishes([__DIR__ . '/../resources/views' => base_path('resources/views/vendor/' . static::PACKAGE_NAME)]);
     $this->loadViewsFrom(__DIR__ . '/../resources/admin_views', static::PACKAGE_NAME . '_admin');
     $this->publishesAdmin([__DIR__ . '/../resources/admin_views' => base_path('resources/views/vendor/' . static::PACKAGE_NAME . '_admin')]);
     $this->loadTranslationsFrom('/', static::PACKAGE_NAME);
     $this->publishes([__DIR__ . '/../assets/' => public_path('vendor/translation')], 'public');
     $this->publishes([__DIR__ . '/../database/migrations/' => database_path('/migrations')], 'migrations');
     $this->publishes([__DIR__ . '/../config/' . static::PACKAGE_NAME . '.php' => config_path('neonbug/' . static::PACKAGE_NAME . '.php')]);
     //============
     //== ROUTES ==
     //============
     $language = App::make('Language');
     $locale = $language == null ? Config::get('app.default_locale') : $language->locale;
     $admin_language = App::make('AdminLanguage');
     $admin_locale = $admin_language == null ? Config::get('app.admin_default_locale') : $admin_language->locale;
     $resource_repo = App::make('ResourceRepository');
     //admin
     $router->group(['prefix' => $admin_locale . '/admin/' . static::PREFIX, 'middleware' => ['auth.admin', 'admin.menu'], 'role' => static::ROLE, 'menu.icon' => 'world', 'weight' => 6], function ($router) {
         $router->get('list', ['as' => static::PREFIX . '::admin::list', 'uses' => static::ADMIN_CONTROLLER . '@adminList']);
         $router->get('edit/{id}', ['as' => static::PREFIX . '::admin::edit', 'uses' => static::ADMIN_CONTROLLER . '@adminEdit']);
         $router->post('edit/{id}', ['as' => static::PREFIX . '::admin::edit-save', 'uses' => static::ADMIN_CONTROLLER . '@adminEditPost']);
     });
     $router->group(['prefix' => $admin_locale . '/admin/' . static::PREFIX, 'middleware' => ['auth.admin'], 'role' => static::ROLE], function ($router) {
         $router->post('delete', ['as' => static::PREFIX . '::admin::delete', 'uses' => static::ADMIN_CONTROLLER . '@adminDeletePost']);
     });
     parent::boot($router);
 }
开发者ID:neonbug,项目名称:meexo-translation,代码行数:38,代码来源:ServiceProvider.php

示例9: routes

 private function routes(Router $router)
 {
     $router->group(['prefix' => 'api/newsletter', 'namespace' => __NAMESPACE__ . '\\Http\\Controllers', 'middleware' => 'api'], function (Router $router) {
         $router->post('members', 'NewsletterController@subscribe');
     });
     $router->group(['prefix' => 'admin', 'namespace' => __NAMESPACE__ . '\\Http\\Controllers\\Admin', 'middleware' => 'web', 'as' => 'admin.newsletters.'], function (Router $router) {
         $router->group(['prefix' => 'newsletters'], function (Router $router) {
             $router->get('/', 'Newsletters@index')->name('index');
             $router->get('/create', 'Newsletters@create')->name('create');
             $router->get('/{newsletter}', 'Newsletters@show')->name('show');
             $router->get('/{newsletter}/body', 'Newsletters@body')->name('show.body');
             $router->post('/', 'Newsletters@store')->name('store');
             $router->post('/preview', 'Newsletters@preview')->name('preview');
             $router->post('/send', 'Newsletters@storeAndSend')->name('store_and_send');
             $router->post('/{newsletter}', 'Newsletters@update')->name('update');
             $router->post('/{newsletter}/send', 'Newsletters@updateAndSend')->name('update_and_send');
             $router->delete('/{newsletter}', 'Newsletters@destroy')->name('destroy');
         });
         $router->group(['prefix' => 'newsletter-lists', 'as' => 'lists.'], function (Router $router) {
             $router->get('/', 'Lists@index')->name('index');
             $router->get('/create', 'Lists@create')->name('create');
             $router->post('/', 'Lists@store')->name('store');
             $router->put('/default', 'Lists@setDefault')->name('default');
             $router->get('/{list}', 'Lists@show')->name('show');
             $router->get('/{list}/edit', 'Lists@edit')->name('edit');
             $router->put('/{list}', 'Lists@update')->name('update');
             $router->delete('/{list}', 'Lists@destroy')->name('destroy');
             $router->get('/{list}/members', 'Members@index');
             $router->post('/{list}/members', 'Members@store')->name('members.store');
             $router->delete('/{list}/members/{member}', 'Members@destroy')->name('members.destroy');
             $router->post('/parse', 'Parser@parse');
         });
     });
 }
开发者ID:jeroennoten,项目名称:laravel-newsletter,代码行数:34,代码来源:ServiceProvider.php

示例10: map

 /**
  * Define the routes for the application.
  *
  * @param  \Illuminate\Routing\Router  $router
  * @return void
  */
 public function map(Router $router)
 {
     $router->when('admin/contacts*', 'AdminRole');
     $router->bind('contact', function ($value) {
         return Contact::where('id', $value)->first();
     });
     /**
      * API routes
      */
     $router->group(['namespace' => $this->namespace, 'prefix' => 'api'], function ($router) {
         $router->post('contacts/batchUpdate', 'ApiContactsController@batchUpdate');
         $router->post('contacts/batchDelete', 'ApiContactsController@batchDelete');
         $router->post('contacts/setOrder', 'ApiContactsController@setOrder');
         $router->resource('contacts', 'ApiContactsController');
     });
     /**
      * Admin routes
      */
     $router->group(['namespace' => $this->namespace, 'prefix' => 'admin', 'middleware' => ['auth']], function ($router) {
         //List Contact
         $router->get('contacts', ['as' => 'contacts', 'uses' => 'AdminContactsController@getIndex', 'permission' => 'contacts_manage']);
         //Create Contact
         $router->get('contacts/create', ['as' => 'create_contacts', 'uses' => 'AdminContactsController@getCreate', 'permission' => 'contacts_manage']);
         $router->post('contacts', ['as' => 'create_contacts', 'uses' => 'AdminContactsController@postCreate', 'permission' => 'contacts_manage']);
         //Edit Contact
         $router->get('contacts/{id}/edit', ['as' => 'edit', 'uses' => 'AdminContactsController@getEdit', 'permission' => 'contacts_manage']);
         $router->post('contacts/{id}', ['uses' => 'AdminContactsController@postEdit', 'permission' => 'contacts_manage']);
         $router->get('contacts/export', ['uses' => 'AdminContactsController@export', 'permission' => 'contacts_manage']);
         $router->resource('admin/contacts', 'AdminContactsController');
     });
 }
开发者ID:khaledof,项目名称:brikaCms,代码行数:37,代码来源:RouteServiceProvider.php

示例11: map

 /**
  * @param Router $router
  */
 public function map(Router $router)
 {
     $router->group(['namespace' => $this->namespace, 'prefix' => 'backend', 'middleware' => ['web', 'theme:backend', 'lang', 'configure:backend']], function (Router $router) {
         $router->get('/', function () {
             return redirect(url('backend/c/dashboard'));
         });
         $router->group(['middleware' => 'guest'], function (Router $router) {
             $router->get('login', 'Auth\\AuthController@getLogin');
             $router->post('login', 'Auth\\AuthController@postLogin');
             $router->get('forgot-password', 'Auth\\PasswordController@getEmail');
             $router->post('forgot-password', 'Auth\\PasswordController@postEmail');
             $router->get('reset-password/{code}', 'Auth\\PasswordController@getReset');
             $router->post('reset-password', 'Auth\\PasswordController@postReset');
         });
         $router->group(['middleware' => 'auth:admin'], function (Router $router) {
             $router->get('logout', function () {
                 \Auth::logout();
                 \Session::flush();
                 return redirect('/backend/login');
             });
             $router->any('c/{controller}', function (Request $request, $controller) {
                 return app()->call($this->namespace . '\\' . ucfirst($controller) . 'Controller@' . ucfirst(strtolower($request->method())) . 'Index');
             });
             $router->any('c/{controller}/a/{action}', function (Request $request, $controller, $action) {
                 return app()->call($this->namespace . '\\' . ucfirst($controller) . 'Controller@' . ucfirst(strtolower($request->method())) . ucfirst(strtolower($action)));
             });
         });
     });
 }
开发者ID:shopvel,项目名称:shopvel,代码行数:32,代码来源:BackendServiceProvider.php

示例12: map

 public function map(Router $router)
 {
     $router->group(['prefix' => 'dashboard', 'as' => 'dashboard.', 'middleware' => 'auth', 'namespace' => 'Dashboard'], function ($router) {
         # 后台首页
         $router->get('/', ['as' => 'console', 'uses' => 'AdminController@console']);
         #--------------------
         # 控制面板
         #--------------------
         # 个人资料
         $router->get('me', ['as' => 'me', 'uses' => 'AdminMeController@me']);
         $router->post('me', 'AdminMeController@meProfile');
         # 头像上传
         $router->post('avatar', ['as' => 'avatar', 'uses' => 'AdminMeController@avatarUpload']);
         #--------------------
         # 内容管理
         #--------------------
         # 期数
         $router->delete('issue/delete', ['as' => 'issue.delete', 'uses' => 'AdminIssueController@batchDelete']);
         $router->resource('issue', 'AdminIssueController');
         # 文章
         $router->delete('article/delete', ['as' => 'article.delete', 'uses' => 'AdminArticleController@batchDelete']);
         $router->resource('article', 'AdminArticleController');
         # 投稿
         $router->delete('submission/delete', ['as' => 'submission.delete', 'uses' => 'AdminSubmissionController@batchDelete']);
         $router->get('submission', ['as' => 'submission.index', 'uses' => 'AdminSubmissionController@index']);
         $router->get('submission/{id}/edit', ['as' => 'submission.edit', 'uses' => 'AdminSubmissionController@edit']);
         $router->put('submission/{id}', ['as' => 'submission.update', 'uses' => 'AdminSubmissionController@update']);
         $router->delete('submission/{id}', ['as' => 'submission.destroy', 'uses' => 'AdminSubmissionController@destroy']);
         # 分类
         $router->resource('category', 'AdminCategoryController');
         #--------------------
         # 用户管理
         #--------------------
         $router->group(['middleware' => 'deny403:manage_users'], function ($router) {
             # 后台员
             $router->resource('user', 'AdminUserController');
             # 订阅用户
             $router->delete('subscribe/delete', ['as' => 'subscribe.delete', 'uses' => 'AdminSubscribeController@batchDelete']);
             $router->resource('subscribe', 'AdminSubscribeController');
             # 角色
             $router->resource('role', 'AdminRoleController');
             # 权限
             $router->resource('permission', 'AdminPermissionController');
         });
         #--------------------
         # 系统管理
         #--------------------
         $router->group(['middleware' => 'deny403:manage_system'], function ($router) {
             # 系统配置
             $router->get('system_settings', ['as' => 'system.setting', 'uses' => 'AdminSystemSettingController@index']);
             $router->post('system_settings', 'AdminSystemSettingController@update');
             # 系统日志
             $router->get('system_logs', ['as' => 'system.log.index', 'uses' => 'AdminSystemLogController@index']);
             $router->get('system_logs/{id}', ['as' => 'system.log.show', 'uses' => 'AdminSystemLogController@show']);
             # 导出 excel
             $router->get('export/excel', ['as' => 'export.excel', 'uses' => 'AdminSystemLogController@excelExport']);
         });
     });
 }
开发者ID:axex,项目名称:kratos,代码行数:59,代码来源:DashboardRoutes.php

示例13: init

 /**
  * @return void
  */
 public final function init()
 {
     if (is_null($this->path) || is_null($this->handler)) {
         throw new \InvalidArgumentException('Handler or Path must be Setted!');
     }
     $this->router->group(['middleware' => 'web'], function () {
         $this->router->get($this->path, $this->handler);
     });
 }
开发者ID:notadd,项目名称:framework,代码行数:12,代码来源:Administrator.php

示例14: map

 /**
  * Define the routes for the addon.
  *
  * @param \Illuminate\Routing\Router $router (injection)
  * @return void
  */
 public function map(Router $router)
 {
     $router->group(['prefix' => addon()->config('wordpress.url.backend_prefix'), 'namespace' => $this->namespace], function ($router) {
         require __DIR__ . '/../Http/backend-routes.php';
     });
     $router->group(['prefix' => addon()->config('wordpress.url.site_prefix'), 'namespace' => $this->namespace], function ($router) {
         require __DIR__ . '/../Http/site-routes.php';
     });
 }
开发者ID:tvad911,项目名称:laravel-addon-wordpress,代码行数:15,代码来源:RouteServiceProvider.php

示例15: map

 public function map(Router $router)
 {
     $router->group(['namespace' => $this->namespace, 'prefix' => $this->prefix, 'as' => $this->prefix . '.', 'middleware' => ['web']], function ($router) {
         require app_path($this->path . 'routes.php');
         $router->group(['namespace' => 'Client', 'prefix' => 'clients', 'as' => 'client.', 'middleware' => ['auth:' . $this->prefix]], function ($router) {
             require app_path($this->path . 'clients.php');
         });
     });
 }
开发者ID:angelobiscola,项目名称:lv2-set-up-multipl-users-and-modularized,代码行数:9,代码来源:AdminServiceProvider.php


注:本文中的Illuminate\Routing\Router::group方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。