本文整理汇总了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']);
});
}
示例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);
}