當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Routing\Registrar類代碼示例

本文整理匯總了PHP中Illuminate\Contracts\Routing\Registrar的典型用法代碼示例。如果您正苦於以下問題:PHP Registrar類的具體用法?PHP Registrar怎麽用?PHP Registrar使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了Registrar類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: map

 /**
  * Define the status page routes.
  *
  * @param \Illuminate\Contracts\Routing\Registrar $router
  *
  * @return void
  */
 public function map(Registrar $router)
 {
     $router->group(['middleware' => ['web', 'ready']], function (Registrar $router) {
         $router->get('/atom/{component_group?}', ['as' => 'feed.atom', 'uses' => 'FeedController@atomAction']);
         $router->get('/rss/{component_group?}', ['as' => 'feed.rss', 'uses' => 'FeedController@rssAction']);
     });
 }
開發者ID:aksalj,項目名稱:Cachet,代碼行數:14,代碼來源:FeedRoutes.php

示例2: map

 /**
  * Define the status page routes.
  *
  * @param \Illuminate\Contracts\Routing\Registrar $router
  */
 public function map(Registrar $router)
 {
     $router->group(['middleware' => 'app.isSetup'], function ($router) {
         $router->get('/', ['as' => 'status-page', 'uses' => 'StatusPageController@showIndex']);
         $router->get('incident/{incident}', ['as' => 'incident', 'uses' => 'StatusPageController@showIncident']);
     });
 }
開發者ID:annggeel,項目名稱:Cachet,代碼行數:12,代碼來源:StatusPageRoutes.php

示例3: map

 /**
  * Define the status page routes.
  *
  * @param \Illuminate\Contracts\Routing\Registrar $router
  */
 public function map(Registrar $router)
 {
     $router->group(['middleware' => ['app.hasSetting', 'localize'], 'setting' => 'app_name'], function ($router) {
         $router->get('/', ['as' => 'status-page', 'uses' => 'StatusPageController@showIndex']);
         $router->get('incident/{incident}', ['as' => 'incident', 'uses' => 'StatusPageController@showIncident']);
     });
 }
開發者ID:minhkiller,項目名稱:Cachet,代碼行數:12,代碼來源:StatusPageRoutes.php

示例4: map

 public function map(Registrar $router)
 {
     $router->group(['prefix' => 'test'], function ($router) {
         $router->get('/', ['uses' => 'TestController@test']);
         $router->get('/queue', ['uses' => 'TestController@queue']);
     });
 }
開發者ID:tanteng,項目名稱:tanteng.me,代碼行數:7,代碼來源:TestRoutes.php

示例5: map

 /**
  * Define the signup routes.
  *
  * @param \Illuminate\Contracts\Routing\Registrar $router
  *
  * @return void
  */
 public function map(Registrar $router)
 {
     $router->group(['middleware' => ['web', 'ready', 'guest'], 'as' => 'signup.'], function (Registrar $router) {
         $router->get('signup/invite/{code}', ['as' => 'invite', 'uses' => 'SignupController@getSignup']);
         $router->post('signup/invite/{code}', ['uses' => 'SignupController@postSignup']);
     });
 }
開發者ID:aksalj,項目名稱:Cachet,代碼行數:14,代碼來源:SignupRoutes.php

示例6: map

 /**
  * Define the signup routes.
  *
  * @param \Illuminate\Contracts\Routing\Registrar $router
  */
 public function map(Registrar $router)
 {
     $router->group(['middleware' => ['app.hasSetting', 'guest'], 'setting' => 'app_name', 'as' => 'signup.'], function ($router) {
         $router->get('signup/invite/{code}', ['as' => 'invite', 'uses' => 'SignupController@getSignup']);
         $router->post('signup/invite/{code}', ['uses' => 'SignupController@postSignup']);
     });
 }
開發者ID:emtudo,項目名稱:Gitamin,代碼行數:12,代碼來源:SignupRoutes.php

示例7: map

 /**
  * Define the status page routes.
  *
  * @param \Illuminate\Contracts\Routing\Registrar $router
  */
 public function map(Registrar $router)
 {
     // Prevent access until the app is setup.
     $router->group(['middleware' => 'app.hasSetting', 'setting' => 'app_name'], function ($router) {
         $router->get('/', ['as' => 'status-page', 'uses' => 'HomeController@showIndex']);
     });
 }
開發者ID:anujaprasad,項目名稱:Hihat,代碼行數:12,代碼來源:StatusPageRoutes.php

示例8: bind

 public function bind(Registrar $router)
 {
     $router->group(['prefix' => 'admin', 'namespace' => 'App\\Http\\Admin\\Controllers', 'middleware' => ['web', 'guest'], 'category' => 'Sentinel'], function (Registrar $sentinel) {
         $sentinel->get('dashboard', ['as' => 'admin.dashboard', 'uses' => 'Controller@index']);
         $sentinel->get('account/user', ['as' => 'admin.account.user', 'uses' => 'Sentinel\\AccountController@editAccountUser']);
         $sentinel->post('account/user-info/update', ['as' => 'admin.account.user.update', 'uses' => 'Sentinel\\AccountController@updateAccountUser']);
         $sentinel->get('account/person', ['as' => 'admin.account.person', 'uses' => 'Sentinel\\AccountController@editAccountPerson']);
         $sentinel->post('account/personal-info/update', ['as' => 'admin.account.person.update', 'uses' => 'Sentinel\\AccountController@updateAccountPerson']);
         $sentinel->get('system', ['as' => 'admin.settings.user.system', 'uses' => 'Sentinel\\AccountController@editSystem']);
         $sentinel->post('system/update', ['as' => 'admin.settings.user.system.update', 'uses' => 'Sentinel\\AccountController@updateSystem']);
     });
     $router->group(['prefix' => 'admin', 'namespace' => 'App\\Http\\Admin\\Controllers\\Sentinel', 'middleware' => ['web', 'guest', 'backendPermissions'], 'category' => 'Sentinel'], function (Registrar $sentinel) {
         $sentinel->resource('user', 'UserController');
         $sentinel->put('user/{userId}/restore', ['as' => 'admin.user.delete.restore', 'uses' => 'UserController@restore']);
         $sentinel->put('user/{userId}/activate', ['as' => 'admin.user.edit.activate', 'uses' => 'UserController@activate']);
         $sentinel->put('user/{userId}/deactivate', ['as' => 'admin.user.edit.deactivate', 'uses' => 'UserController@deactivate']);
         $sentinel->resource('group', 'GroupController');
         $sentinel->get('group/{group}/members', ['as' => 'admin.group.edit.members', 'uses' => 'GroupController@editMembers']);
         $sentinel->post('group/{group}/attach/{user}', ['as' => 'admin.group.add.attach', 'uses' => 'GroupController@attach']);
         $sentinel->delete('group/{group}/detach/{user}', ['as' => 'admin.group.delete.detach', 'uses' => 'GroupController@detach']);
     });
     $router->group(['prefix' => 'admin', 'namespace' => 'App\\Http\\Admin\\Controllers\\Sentinel', 'middleware' => ['web', 'guest'], 'category' => 'Sentinel'], function (Registrar $manager) {
         $manager->get('user/{user}/permissions/edit', ['as' => 'admin.user.permission.edit', 'uses' => 'PermissionController@edit']);
         $manager->post('user/{user}/{permission_type}/edit', ['as' => 'admin.user.permission.update', 'uses' => 'PermissionController@update']);
         $manager->get('group/{group}/permissions/edit', ['as' => 'admin.group.permission.edit', 'uses' => 'PermissionController@edit']);
         $manager->post('group/{group}/{permission_type}/edit', ['as' => 'admin.group.permission.update', 'uses' => 'PermissionController@update']);
         $manager->post('user/{user}/{permission_type}/toggle', ['as' => 'admin.user.permission.toggle', 'uses' => 'PermissionController@toggle']);
         $manager->post('group/{group}/{permission_type}/toggle', ['as' => 'admin.group.permission.toggle', 'uses' => 'PermissionController@toggle']);
     });
 }
開發者ID:linguisticteam,項目名稱:laravel-boilerplate,代碼行數:30,代碼來源:Sentinel.php

示例9: map

 /**
  * Define the groups routes.
  *
  * @param \Illuminate\Contracts\Routing\Registrar $router
  */
 public function map(Registrar $router)
 {
     // Project Sub-routes groups.group_show, groups.group_edit
     $router->group(['middleware' => ['app.hasSetting', 'auth'], 'setting' => 'app_name', 'as' => 'owners.'], function ($router) {
         $router->get('{owner_path}', ['as' => 'owner_show', 'uses' => 'OwnersController@showAction'])->where('owner_path', '[a-zA-z.0-9_\\-]+');
     });
 }
開發者ID:xiaobailc,項目名稱:Gitamin,代碼行數:12,代碼來源:OwnersRoutes.php

示例10: map

 /**
  * Define the status page routes.
  *
  * @param \Illuminate\Contracts\Routing\Registrar $router
  *
  * @return void
  */
 public function map(Registrar $router)
 {
     $router->group(['middleware' => ['web', 'ready', 'localize']], function ($router) {
         $router->get('/', ['as' => 'status-page', 'uses' => 'StatusPageController@showIndex']);
         $router->get('incident/{incident}', ['as' => 'incident', 'uses' => 'StatusPageController@showIncident']);
     });
 }
開發者ID:CMNatic,項目名稱:Cachet,代碼行數:14,代碼來源:StatusPageRoutes.php

示例11: map

 /**
  * Define the routes for the application.
  *
  * @param  \Illuminate\Contracts\Routing\Registrar  $router
  */
 public function map(Router $router)
 {
     if ($this->isEnabled()) {
         $router->group($this->routeAttributes(), function (Router $router) {
             LogViewerRoute::register($router);
         });
     }
 }
開發者ID:shellofyou,項目名稱:laravel-boilerplate,代碼行數:13,代碼來源:RouteServiceProvider.php

示例12: map

 /**
  * Define the status page routes.
  *
  * @param \Illuminate\Contracts\Routing\Registrar $router
  */
 public function map(Registrar $router)
 {
     // Prevent access until the app is setup.
     $router->group(['middleware' => 'app.hasSetting', 'setting' => 'app_name'], function ($router) {
         $router->get('/atom/{component_group?}', 'AtomController@feedAction');
         $router->get('/rss/{component_group?}', 'RssController@feedAction');
     });
 }
開發者ID:anujaprasad,項目名稱:Hihat,代碼行數:13,代碼來源:FeedRoutes.php

示例13: map

 /**
  * Define the feed routes.
  *
  * @param \Illuminate\Contracts\Routing\Registrar $router
  */
 public function map(Registrar $router)
 {
     // Prevent access until the app is setup.
     $router->group(['middleware' => 'app.hasSetting', 'setting' => 'app_name'], function ($router) {
         $router->get('/atom/{project_group?}', ['as' => 'feed.atom', 'uses' => 'FeedController@atomAction']);
         $router->get('/rss/{project_group?}', ['as' => 'feed.rss', 'uses' => 'FeedController@rssAction']);
     });
 }
開發者ID:emtudo,項目名稱:Gitamin,代碼行數:13,代碼來源:FeedRoutes.php

示例14: mapBackEndRoutes

 /**
  * Define the foundation routes for the application.
  *
  * @param  \Illuminate\Contracts\Routing\Registrar  $router
  */
 private function mapBackEndRoutes(Router $router)
 {
     $attributes = array_merge($this->getFoundationRouteGroup(), ['as' => 'pages::foundation.', 'namespace' => 'Arcanesoft\\Pages\\Http\\Controllers\\Back']);
     $router->group(array_merge($attributes, ['prefix' => $this->getFoundationPagesPrefix()]), function (Router $router) {
         Routes\Back\StatsRoutes::register($router);
         Routes\Back\PagesRoutes::register($router);
     });
 }
開發者ID:arcanesoft,項目名稱:pages,代碼行數:13,代碼來源:RouteServiceProvider.php

示例15: map

 /**
  * Define the auth routes.
  *
  * @param \Illuminate\Contracts\Routing\Registrar $router
  */
 public function map(Registrar $router)
 {
     $router->group(['as' => 'auth.', 'middleware' => 'app.hasSetting', 'prefix' => 'auth', 'setting' => 'app_name'], function ($router) {
         $router->get('login', ['middleware' => 'guest', 'as' => 'login', 'uses' => 'AuthController@loginAction']);
         $router->post('login', ['middleware' => ['guest', 'csrf'], 'uses' => 'AuthController@loginPost']);
         $router->get('logout', ['as' => 'logout', 'uses' => 'AuthController@logoutAction', 'middleware' => 'auth']);
     });
 }
開發者ID:xiaobailc,項目名稱:Gitamin,代碼行數:13,代碼來源:AuthRoutes.php


注:本文中的Illuminate\Contracts\Routing\Registrar類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。