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


PHP Registrar::put方法代码示例

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


在下文中一共展示了Registrar::put方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: 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');
         // Components
         $router->get('components', 'ComponentController@getComponents');
         $router->get('components/groups', 'ComponentGroupController@getGroups');
         $router->get('components/groups/{component_group}', 'ComponentGroupController@getGroup');
         $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');
         // Authorization Required
         $router->group(['middleware' => 'auth.api'], function ($router) {
             $router->get('subscribers', 'SubscriberController@getSubscribers');
             $router->post('components', 'ComponentController@postComponents');
             $router->post('components/groups', 'ComponentGroupController@postGroups');
             $router->post('incidents', 'IncidentController@postIncidents');
             $router->post('metrics', 'MetricController@postMetrics');
             $router->post('metrics/{metric}/points', 'MetricPointController@postMetricPoints');
             $router->post('subscribers', 'SubscriberController@postSubscribers');
             $router->put('components/groups/{component_group}', 'ComponentGroupController@putGroup');
             $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/groups/{component_group}', 'ComponentGroupController@deleteGroup');
             $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');
             $router->delete('subscribers/{subscriber}', 'SubscriberController@deleteSubscriber');
         });
     });
 }
开发者ID:guduchango,项目名称:Cachet,代码行数:45,代码来源:ApiRoutes.php

示例4: map

 /**
  * Define the api routes.
  *
  * @param \Illuminate\Contracts\Routing\Registrar $router
  *
  * @return void
  */
 public function map(Registrar $router)
 {
     $router->group(['namespace' => 'Api', 'prefix' => 'api/v1', 'middleware' => ['api']], function (Registrar $router) {
         $router->group(['middleware' => ['auth.api']], function (Registrar $router) {
             $router->get('ping', 'GeneralController@ping');
             $router->get('version', 'GeneralController@version');
             $router->get('status', 'GeneralController@status');
             $router->get('components', 'ComponentController@getComponents');
             $router->get('components/groups', 'ComponentGroupController@getGroups');
             $router->get('components/groups/{component_group}', 'ComponentGroupController@getGroup');
             $router->get('components/{component}', 'ComponentController@getComponent');
             $router->get('incidents', 'IncidentController@getIncidents');
             $router->get('incidents/{incident}', 'IncidentController@getIncident');
             $router->get('metrics', 'MetricController@getMetrics');
             $router->get('metrics/{metric}', 'MetricController@getMetric');
             $router->get('metrics/{metric}/points', 'MetricController@getMetricPoints');
         });
         $router->group(['middleware' => ['auth.api:true']], function (Registrar $router) {
             $router->get('subscribers', 'SubscriberController@getSubscribers');
             $router->post('components', 'ComponentController@postComponents');
             $router->post('components/groups', 'ComponentGroupController@postGroups');
             $router->post('incidents', 'IncidentController@postIncidents');
             $router->post('metrics', 'MetricController@postMetrics');
             $router->post('metrics/{metric}/points', 'MetricPointController@postMetricPoints');
             $router->post('subscribers', 'SubscriberController@postSubscribers');
             $router->put('components/groups/{component_group}', 'ComponentGroupController@putGroup');
             $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/groups/{component_group}', 'ComponentGroupController@deleteGroup');
             $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');
             $router->delete('subscribers/{subscriber}', 'SubscriberController@deleteSubscriber');
             $router->delete('subscriptions/{subscription}', 'SubscriberController@deleteSubscription');
         });
     });
 }
开发者ID:aksalj,项目名称:Cachet,代码行数:47,代码来源:ApiRoutes.php

示例5: put

 /**
  * Register a new PUT route with the router.
  *
  * @param  string                $uri
  * @param  Closure|array|string  $action
  */
 public function put($uri, $action)
 {
     $this->router->put($uri, $action);
 }
开发者ID:dprabhath,项目名称:SEP_WE_016,代码行数:10,代码来源:RouteRegister.php


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