当前位置: 首页>>代码示例>>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;未经允许,请勿转载。