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


PHP Registrar::controller方法代码示例

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


在下文中一共展示了Registrar::controller方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: map

 /**
  * Define the install routes.
  *
  * @param \Illuminate\Contracts\Routing\Registrar $router
  */
 public function map(Registrar $router)
 {
     //Default - Dashboard
     $router->group(['middleware' => ['app.hasSetting', 'auth'], 'setting' => 'app_name'], function ($router) {
         $router->get('/', ['as' => 'home', 'uses' => 'DashboardController@indexAction']);
     });
     //Install Area
     $router->group(['middleware' => ['app.isInstalled', 'localize']], function ($router) {
         $router->controller('install', 'InstallController');
     });
     //Signup Area
     $router->group(['middleware' => ['app.hasSetting', 'guest'], 'setting' => 'app_name', 'as' => 'signup.'], function ($router) {
         $router->get('signup', ['as' => 'signup', 'uses' => 'SignupController@getSignup']);
         $router->post('signup', ['uses' => 'SignupController@postSignup']);
         $router->get('signup/invite/{code}', ['as' => 'invite', 'uses' => 'SignupController@getSignup']);
         $router->post('signup/invite/{code}', ['uses' => 'SignupController@postSignup']);
     });
     //Explore Area
     $router->group(['middleware' => ['app.hasSetting'], 'setting' => 'app_name', 'prefix' => 'explore', 'as' => 'explore.'], function ($router) {
         $router->get('/', ['as' => 'index', 'uses' => 'ExploreController@indexAction']);
         $router->get('groups', ['as' => 'groups', 'uses' => 'ExploreController@groupsAction']);
         $router->get('issue/{issue}', ['as' => 'issue', 'uses' => 'ExploreController@showIssue']);
     });
     // Feed Area
     $router->group(['middleware' => 'app.hasSetting', 'setting' => 'app_name'], function ($router) {
         $router->get('/atom/{namespace?}', ['as' => 'feed.atom', 'uses' => 'FeedController@atomAction']);
         $router->get('/rss/{namespace?}', ['as' => 'feed.rss', 'uses' => 'FeedController@rssAction']);
     });
     // Profile Area
     $router->group(['middleware' => ['app.hasSetting'], 'setting' => 'app_name', 'as' => 'profile.'], function ($router) {
         $router->get('profile', ['as' => 'index', 'uses' => 'ProfilesController@indexAction']);
         $router->post('profile', ['as' => 'update', 'uses' => 'ProfilesController@updateAction']);
         $router->get('profile/{username}', ['as' => 'show', 'uses' => 'ProfilesController@showAction'])->where('username', '[a-zA-z.0-9_\\-]+');
     });
 }
开发者ID:xiaobailc,项目名称:Gitamin,代码行数:40,代码来源:DefaultRoutes.php

示例2: map

 /**
  * Define the install routes.
  *
  * @param \Illuminate\Contracts\Routing\Registrar $router
  */
 public function map(Registrar $router)
 {
     //Homepage
     $router->group(['middleware' => ['app.hasSetting'], 'setting' => 'app_name'], function ($router) {
         $router->get('/', ['as' => 'index', 'uses' => 'ExploreController@index']);
     });
     //Install Area
     $router->group(['middleware' => ['app.isInstalled', 'localize']], function ($router) {
         $router->controller('install', 'InstallController');
     });
     //Explore Area
     $router->group(['middleware' => ['app.hasSetting'], 'setting' => 'app_name', 'prefix' => 'explore', 'as' => 'explore.'], function ($router) {
         $router->get('/', ['as' => 'index', 'uses' => 'ExploreController@index']);
         $router->get('issue/{issue}', ['as' => 'issue', 'uses' => 'ExploreController@showIssue']);
     });
     // Feed Area
     $router->group(['middleware' => 'app.hasSetting', 'setting' => 'app_name'], function ($router) {
         $router->get('/atom/{namespace?}', ['as' => 'feed.atom', 'uses' => 'FeedController@atomAction']);
         $router->get('/rss/{namespace?}', ['as' => 'feed.rss', 'uses' => 'FeedController@rssAction']);
     });
 }
开发者ID:xiuchanghu,项目名称:Gitamin,代码行数:26,代码来源:DefaultRoutes.php

示例3: map

 /**
  * Define the setup routes.
  *
  * @param \Illuminate\Contracts\Routing\Registrar $router
  */
 public function map(Registrar $router)
 {
     $router->group(['middleware' => 'app.isSetup'], function ($router) {
         $router->controller('setup', 'SetupController');
     });
 }
开发者ID:guduchango,项目名称:Cachet,代码行数:11,代码来源:SetupRoutes.php

示例4: map

 /**
  * Define the install routes.
  *
  * @param \Illuminate\Contracts\Routing\Registrar $router
  */
 public function map(Registrar $router)
 {
     $router->group(['middleware' => ['app.isInstalled', 'localize']], function ($router) {
         $router->controller('install', 'InstallController');
     });
 }
开发者ID:emtudo,项目名称:Gitamin,代码行数:11,代码来源:InstallRoutes.php


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