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


PHP Registrar::group方法代碼示例

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


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

示例1: map

 /**
  * Define the api routes.
  *
  * @param \Illuminate\Contracts\Routing\Registrar $router
  */
 public function map(Registrar $router)
 {
     $router->group(['namespace' => 'Api', 'prefix' => 'api/v1', 'middleware' => 'accept:application/json'], function ($router) {
         // General
         $router->get('ping', 'GeneralController@ping');
         // Components
         $router->get('components', 'ComponentController@getComponents');
         $router->get('components/{component}', 'ComponentController@getComponent');
         // Incidents
         $router->get('incidents', 'IncidentController@getIncidents');
         $router->get('incidents/{incident}', 'IncidentController@getIncident');
         // Metrics
         $router->get('metrics', 'MetricController@getMetrics');
         $router->get('metrics/{metric}', 'MetricController@getMetric');
         $router->get('metrics/{metric}/points', 'MetricController@getMetricPoints');
         // Api protected
         $router->group(['middleware' => 'auth.api'], function ($router) {
             $router->post('components', 'ComponentController@postComponents');
             $router->post('incidents', 'IncidentController@postIncidents');
             $router->post('metrics', 'MetricController@postMetrics');
             $router->post('metrics/{metric}/points', 'MetricPointController@postMetricPoints');
             $router->put('components/{component}', 'ComponentController@putComponent');
             $router->put('incidents/{incident}', 'IncidentController@putIncident');
             $router->put('metrics/{metric}', 'MetricController@putMetric');
             $router->put('metrics/{metric}/points/{metric_point}', 'MetricPointController@putMetricPoint');
             $router->delete('components/{component}', 'ComponentController@deleteComponent');
             $router->delete('incidents/{incident}', 'IncidentController@deleteIncident');
             $router->delete('metrics/{metric}', 'MetricController@deleteMetric');
             $router->delete('metrics/{metric}/points/{metric_point}', 'MetricPointController@deleteMetricPoint');
         });
     });
 }
開發者ID:nguyentamvinhlong,項目名稱:Cachet,代碼行數:37,代碼來源:ApiRoutes.php

示例2: map

 /**
  * Define the api routes.
  *
  * @param \Illuminate\Contracts\Routing\Registrar $router
  */
 public function map(Registrar $router)
 {
     $router->group(['namespace' => 'Api', 'prefix' => 'api/v1', 'middleware' => ['accept:application/json', 'timezone', 'auth.api.optional']], function ($router) {
         // General
         $router->get('ping', 'GeneralController@ping');
         // Projects
         $router->get('projects', 'ProjectController@getProjects');
         $router->get('projects/teams', 'ProjectTeamController@getTeams');
         $router->get('projects/teams/{project_team}', 'ProjectTeamController@getTeam');
         $router->get('projects/{project}', 'ProjectController@getProject');
         // Issues
         $router->get('issues', 'IssueController@getIssues');
         $router->get('issues/{issue}', 'IssueController@getIssue');
         // Authorization Required
         $router->group(['middleware' => 'auth.api'], function ($router) {
             $router->get('subscribers', 'SubscriberController@getSubscribers');
             $router->post('projects', 'ProjectController@postProjects');
             $router->post('projects/teams', 'ProjectTeamController@postTeams');
             $router->post('issues', 'IssueController@postIssues');
             $router->post('subscribers', 'SubscriberController@postSubscribers');
             $router->put('projects/teams/{project_team}', 'ProjectTeamController@putTeam');
             $router->put('projects/{project}', 'ProjectController@putProject');
             $router->put('issues/{issue}', 'IssueController@putIssue');
             $router->delete('projects/teams/{project_team}', 'ProjectTeamController@deleteTeam');
             $router->delete('projects/{project}', 'ProjectController@deleteProject');
             $router->delete('issues/{issue}', 'IssueController@deleteIssue');
             $router->delete('subscribers/{subscriber}', 'SubscriberController@deleteSubscriber');
         });
     });
 }
開發者ID:xiuchanghu,項目名稱:Gitamin,代碼行數:35,代碼來源:ApiRoutes.php

示例3: 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

示例4: map

 /**
  * Define the subscribe routes.
  *
  * @param \Illuminate\Contracts\Routing\Registrar $router
  *
  * @return void
  */
 public function map(Registrar $router)
 {
     $router->group(['middleware' => ['web', 'ready', 'localize'], 'as' => 'subscribe.'], function ($router) {
         $router->group(['middleware' => ['subscribers']], function ($router) {
             $router->get('subscribe', ['as' => 'subscribe', 'uses' => 'SubscribeController@showSubscribe']);
             $router->post('subscribe', ['uses' => 'SubscribeController@postSubscribe']);
         });
         $router->get('subscribe/verify/{code}', ['as' => 'verify', 'uses' => 'SubscribeController@getVerify']);
         $router->get('unsubscribe/{code}/{subscription?}', ['as' => 'unsubscribe', 'uses' => 'SubscribeController@getUnsubscribe']);
     });
 }
開發者ID:mohitsethi,項目名稱:Cachet,代碼行數:18,代碼來源:SubscribeRoutes.php

示例5: map

 /**
  * Define the subscribe routes.
  *
  * @param \Illuminate\Contracts\Routing\Registrar $router
  */
 public function map(Registrar $router)
 {
     $router->group(['middleware' => 'app.hasSetting', 'setting' => 'app_name'], function ($router) {
         $router->group(['middleware' => 'app.subscribers'], function ($router) {
             $router->get('subscribe', ['as' => 'subscribe-page', 'uses' => 'SubscribeController@showSubscribe']);
             $router->post('subscribe', ['as' => 'subscribe', 'uses' => 'SubscribeController@postSubscribe']);
             $router->get('subscribe/verify/{code}', ['as' => 'subscribe-verify', 'uses' => 'SubscribeController@getVerify']);
             $router->get('unsubscribe/{code}', ['as' => 'unsubscribe', 'uses' => 'SubscribeController@getUnsubscribe']);
         });
     });
 }
開發者ID:seanherron,項目名稱:Cachet,代碼行數:16,代碼來源:SubscribeRoutes.php

示例6: map

 /**
  * Define the groups routes.
  *
  * @param \Illuminate\Contracts\Routing\Registrar $router
  */
 public function map(Registrar $router)
 {
     $router->group(['middleware' => ['app.hasSetting'], 'setting' => 'app_name', 'prefix' => 'groups', 'as' => 'groups.'], function ($router) {
         $router->get('/', ['as' => 'index', 'uses' => 'GroupsController@indexAction']);
         $router->get('new', ['as' => 'new', 'uses' => 'GroupsController@newAction']);
         $router->post('create', ['as' => 'create', 'uses' => 'GroupsController@createAction']);
     });
     // Project Sub-routes groups.group_show, groups.group_edit
     $router->group(['middleware' => ['app.hasSetting'], 'setting' => 'app_name', 'as' => 'groups.'], function ($router) {
         $router->get('{owner_path}/edit', ['as' => 'group_edit', 'uses' => 'GroupsController@editAction'])->where('owner_path', '[a-zA-z.0-9_\\-]+');
         $router->post('{owner_path}', ['as' => 'group_update', 'uses' => 'GroupsController@updateAction'])->where('owner_path', '[a-zA-z.0-9_\\-]+');
     });
 }
開發者ID:xiaobailc,項目名稱:Gitamin,代碼行數:18,代碼來源:GroupsRoutes.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']);
         $router->get('/atom/{component_group?}', 'AtomController@feedAction');
         $router->get('/rss/{component_group?}', 'RssController@feedAction');
         $router->group(['middleware' => 'app.subscribers'], function ($router) {
             $router->get('subscribe', ['as' => 'subscribe-page', 'uses' => 'SubscribeController@showSubscribe']);
             $router->post('subscribe', ['as' => 'subscribe', 'uses' => 'SubscribeController@postSubscribe']);
             $router->get('subscribe/verify/{code}', ['as' => 'subscribe-verify', 'uses' => 'SubscribeController@getVerify']);
             $router->get('unsubscribe/{code}', ['as' => 'unsubscribe', 'uses' => 'SubscribeController@getUnsubscribe']);
         });
     });
 }
開發者ID:hd-deman,項目名稱:Cachet,代碼行數:20,代碼來源:StatusPageRoutes.php

示例8: map

 /**
  * Define the status page routes.
  *
  * @param \Illuminate\Contracts\Routing\Registrar $router
  *
  * @return void
  */
 public function map(Registrar $router)
 {
     $router->group(['middleware' => ['web'], 'namespace' => 'Projects'], function (Registrar $router) {
         $router->get('{owner}/{project}/issues', ['as' => 'issues', 'uses' => 'IssueController@index']);
         $router->get('{owner}/{project}/issues/new', ['as' => 'issue_new', 'uses' => 'IssueController@create']);
         $router->post('{owner}/{project}/issues', ['as' => 'issue_store', 'uses' => 'IssueController@store']);
         $router->get('{owner}/{project}/issues/{issue}', ['as' => 'issue_show', 'uses' => 'IssueController@show']);
         $router->get('/{owner}/{project}/{branch}/rss', ['as' => 'rss', 'uses' => 'RssController@show']);
         $router->get('{owner}/{project}/merge_requests', ['as' => 'merge_requests', 'uses' => 'MergeRequestController@index']);
         $router->get('{owner}/{project}/commits/{commitishPath}', ['as' => 'commits', 'uses' => 'CommitController@index']);
         $router->get('{owner}/{project}/commit/{commit}', ['as' => 'commit', 'uses' => 'CommitController@show']);
         $router->get('{owner}/{project}/stats/{branch}', ['as' => 'stats', 'uses' => 'StatsController@show']);
         $router->get('{owner}/{project}/network/{commitishPath}', ['as' => 'network', 'uses' => 'NetworkController@index']);
         $router->get('{owner}/{project}/network_data/{commitishPath}/{page}', ['as' => 'networkData', 'uses' => 'NetworkController@data']);
         $router->get('{owner}/{project}/treegraph/{commitishPath}', ['as' => 'treegraph', 'uses' => 'TreeGraphController@index']);
         $router->get('{owner}/{project}/{format}ball/{branch}', ['as' => 'archive', 'uses' => 'TreeController@archive']);
         $router->get('{owner}/{project}/blob/{commitishPath}', ['as' => 'blob', 'uses' => 'BlobController@index']);
         $router->get('{owner}/{project}/raw/{commitishPath}', ['as' => 'blob_raw', 'uses' => 'BlobController@raw']);
         $router->get('{owner}/{project}/blame/{commitishPath}', ['as' => 'blame', 'uses' => 'BlameController@show']);
         $router->get('{owner}/{project}/tree/{commitishPath}/', ['as' => 'tree', 'uses' => 'TreeController@tree']);
         $router->get('/{owner}/{project}', ['as' => 'repository', 'uses' => 'TreeController@index']);
         $router->any('{owner}/{project}/tree/{branch}/search', ['as' => 'search', 'uses' => 'TreeController@search']);
         $router->get('{owner}/{project}/{branch}', ['as' => 'branch', 'uses' => 'TreeController@tree']);
     });
 }
開發者ID:gitaminhq,項目名稱:gitamin,代碼行數:32,代碼來源:Projects.php

示例9: 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

示例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']], 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

示例11: 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

示例12: map

 /**
  * Define the admin routes.
  *
  * @param \Illuminate\Contracts\Routing\Registrar $router
  */
 public function map(Registrar $router)
 {
     //Dashboard area
     $router->group(['middleware' => ['auth', 'admin'], 'prefix' => 'admin', 'namespace' => 'Admin', 'as' => 'admin.'], function ($router) {
         $router->get('/', ['as' => 'index', 'uses' => 'DashboardController@indexAction']);
         // Settings
         $router->group(['as' => 'settings.', 'prefix' => 'settings'], function ($router) {
             $router->get('general', ['as' => 'general', 'uses' => 'SettingsController@showGeneralView']);
             $router->get('localization', ['as' => 'localization', 'uses' => 'SettingsController@showLocalizationView']);
             $router->get('timezone', ['as' => 'timezone', 'uses' => 'SettingsController@showTimezoneView']);
             $router->get('theme', ['as' => 'theme', 'uses' => 'SettingsController@showThemeView']);
             $router->get('stylesheet', ['as' => 'stylesheet', 'uses' => 'SettingsController@showStylesheetView']);
             $router->post('/', 'SettingsController@postSettings');
         });
     });
 }
開發者ID:xiaobailc,項目名稱:Gitamin,代碼行數:21,代碼來源:AdminRoutes.php

示例13: 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

示例14: 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

示例15: 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


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