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