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


PHP Registrar::any方法代碼示例

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


在下文中一共展示了Registrar::any方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的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'], '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

示例2: any

 /**
  * Register a new route responding to all verbs.
  *
  * @param  string                 $uri
  * @param  \Closure|array|string  $action
  *
  * @return \Illuminate\Routing\Route|void
  */
 public function any($uri, $action)
 {
     return $this->router->any($uri, $action);
 }
開發者ID:arcanedev,項目名稱:support,代碼行數:12,代碼來源:RouteRegister.php


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