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


PHP Registrar::auth方法代碼示例

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


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

示例1: map

 public function map(Registrar $router)
 {
     $router->group(['domain' => 'www.tanteng.me', 'middleware' => 'web'], function ($router) {
         $router->auth();
         $router->get('/', ['as' => 'home', 'uses' => 'IndexController@index']);
         $router->get('/blog', ['as' => 'index.blog', 'uses' => 'BlogController@index']);
         $router->get('/resume', ['as' => 'index.resume', 'uses' => 'IndexController@resume']);
         $router->get('/page/{slug}', ['as' => 'index.page', 'uses' => 'PageController@share']);
         $router->get('/post', ['name' => 'post.show', 'uses' => 'ArticleController@show']);
         $router->get('/contact', ['as' => 'index.contact', 'uses' => 'IndexController@contact']);
         $router->post('/contact/comment', ['uses' => 'IndexController@postComment']);
         $router->get('/travel', ['as' => 'index.travel', 'uses' => 'TravelController@index']);
         $router->get('/travel/latest', ['as' => 'travel.latest', 'uses' => 'TravelController@latest']);
         $router->get('/travel/{destination}/list', ['as' => 'travel.destination', 'uses' => 'TravelController@travelList']);
         $router->get('/travel/{slug}', ['uses' => 'TravelController@travelDetail']);
         $router->get('/commits', ['as' => 'git.commits', 'uses' => 'IndexController@commitsHistory']);
         $router->post('/gitHistory', ['as' => 'git.history', 'uses' => 'IndexController@gitCommitHistory']);
         $router->get('/sitemap.xml', ['as' => 'index.sitemap', 'uses' => 'IndexController@sitemap']);
         $router->get('/download', ['uses' => 'IndexController@download']);
         $router->get('/donate', ['as' => 'donate', 'uses' => 'IndexController@donate']);
     });
 }
開發者ID:tanteng,項目名稱:tanteng.me,代碼行數:22,代碼來源:HomeRoutes.php


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