本文整理汇总了PHP中Illuminate\Contracts\Routing\Registrar::get方法的典型用法代码示例。如果您正苦于以下问题:PHP Registrar::get方法的具体用法?PHP Registrar::get怎么用?PHP Registrar::get使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Illuminate\Contracts\Routing\Registrar
的用法示例。
在下文中一共展示了Registrar::get方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: map
public function map(Registrar $router)
{
$router->group(['prefix' => 'test'], function ($router) {
$router->get('/', ['uses' => 'TestController@test']);
$router->get('/queue', ['uses' => 'TestController@queue']);
});
}
示例2: 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_\\-]+');
});
}
示例3: map
/**
* Define the status page routes.
*
* @param \Illuminate\Contracts\Routing\Registrar $router
*/
public function map(Registrar $router)
{
$router->group(['middleware' => 'app.isSetup'], function ($router) {
$router->get('/', ['as' => 'status-page', 'uses' => 'StatusPageController@showIndex']);
$router->get('incident/{incident}', ['as' => 'incident', 'uses' => 'StatusPageController@showIncident']);
});
}
示例4: map
/**
* Define the status page routes.
*
* @param \Illuminate\Contracts\Routing\Registrar $router
*/
public function map(Registrar $router)
{
$router->group(['middleware' => ['app.hasSetting', 'localize'], 'setting' => 'app_name'], function ($router) {
$router->get('/', ['as' => 'status-page', 'uses' => 'StatusPageController@showIndex']);
$router->get('incident/{incident}', ['as' => 'incident', 'uses' => 'StatusPageController@showIncident']);
});
}
示例5: map
/**
* Define the status page routes.
*
* @param \Illuminate\Contracts\Routing\Registrar $router
*
* @return void
*/
public function map(Registrar $router)
{
$router->group(['middleware' => ['web', 'ready']], function (Registrar $router) {
$router->get('/atom/{component_group?}', ['as' => 'feed.atom', 'uses' => 'FeedController@atomAction']);
$router->get('/rss/{component_group?}', ['as' => 'feed.rss', 'uses' => 'FeedController@rssAction']);
});
}
示例6: map
/**
* Define the status page routes.
*
* @param \Illuminate\Contracts\Routing\Registrar $router
*
* @return void
*/
public function map(Registrar $router)
{
$router->group(['middleware' => ['web', 'ready', 'localize']], function ($router) {
$router->get('/', ['as' => 'status-page', 'uses' => 'StatusPageController@showIndex']);
$router->get('incident/{incident}', ['as' => 'incident', 'uses' => 'StatusPageController@showIncident']);
});
}
示例7: map
/**
* Define the account routes.
*
* @param \Illuminate\Contracts\Routing\Registrar $router
*
* @return void
*/
public function map(Registrar $router)
{
$router->post('auth/login', ['as' => 'auth_login', 'uses' => 'AuthController@handleLogin']);
$router->get('auth/github-callback', ['as' => 'auth_callback', 'uses' => 'AuthController@handleCallback']);
$router->post('auth/logout', ['as' => 'auth_logout', 'uses' => 'AuthController@handleLogout']);
$router->get('account', ['as' => 'account', 'uses' => 'AccountController@handleShow']);
$router->delete('account/delete', ['as' => 'account_delete', 'uses' => 'AccountController@handleDelete']);
}
示例8: map
/**
* Define the status page routes.
*
* @param \Illuminate\Contracts\Routing\Registrar $router
*/
public function map(Registrar $router)
{
// Prevent access until the app is setup.
$router->group(['middleware' => 'app.hasSetting', 'setting' => 'app_name'], function ($router) {
$router->get('/atom/{component_group?}', 'AtomController@feedAction');
$router->get('/rss/{component_group?}', 'RssController@feedAction');
});
}
示例9: map
/**
* Define the auth routes.
*
* @param \Illuminate\Contracts\Routing\Registrar $router
*/
public function map(Registrar $router)
{
$router->group(['as' => 'auth.', 'middleware' => 'app.hasSetting', 'prefix' => 'auth', 'setting' => 'app_name'], function ($router) {
$router->get('login', ['middleware' => 'guest', 'as' => 'login', 'uses' => 'AuthController@loginAction']);
$router->post('login', ['middleware' => ['guest', 'csrf'], 'uses' => 'AuthController@loginPost']);
$router->get('logout', ['as' => 'logout', 'uses' => 'AuthController@logoutAction', 'middleware' => 'auth']);
});
}
示例10: map
/**
* Define the repo routes.
*
* @param \Illuminate\Contracts\Routing\Registrar $router
*
* @return void
*/
public function map(Registrar $router)
{
$router->get('repos/{repo}', ['as' => 'repo', 'uses' => 'RepoController@handleShow']);
$router->get('repos/{repo}/shield', ['as' => 'repo_shield', 'uses' => 'RepoController@handleShield']);
$router->get('analyses/{analysis}', ['as' => 'analysis', 'uses' => 'RepoController@handleAnalysis']);
$router->get('analyses/{analysis}/diff', ['as' => 'analysis_diff', 'uses' => 'RepoController@handleDiff']);
$router->get('analyses/{analysis}/diff/download', ['as' => 'analysis_download', 'uses' => 'RepoController@handleDiffDownload']);
}
示例11: map
/**
* Define the signup routes.
*
* @param \Illuminate\Contracts\Routing\Registrar $router
*/
public function map(Registrar $router)
{
$router->group(['middleware' => ['app.hasSetting', 'guest'], 'setting' => 'app_name', 'as' => 'signup.'], function ($router) {
$router->get('signup', ['as' => 'user/signup', 'uses' => 'SignupController@getSignup']);
$router->get('signup/invite/{code}', ['as' => 'invite', 'uses' => 'SignupController@getSignup']);
$router->post('signup/invite/{code}', ['uses' => 'SignupController@postSignup']);
});
}
示例12: map
/**
* Define the feed routes.
*
* @param \Illuminate\Contracts\Routing\Registrar $router
*/
public function map(Registrar $router)
{
// Prevent access until the app is setup.
$router->group(['middleware' => 'app.hasSetting', 'setting' => 'app_name'], function ($router) {
$router->get('/atom/{project_group?}', ['as' => 'feed.atom', 'uses' => 'FeedController@atomAction']);
$router->get('/rss/{project_group?}', ['as' => 'feed.rss', 'uses' => 'FeedController@rssAction']);
});
}
示例13: map
/**
* Define the auth routes.
*
* @param \Illuminate\Contracts\Routing\Registrar $router
*/
public function map(Registrar $router)
{
$router->group(['as' => 'auth.', 'namespace' => 'Auth', 'prefix' => 'auth'], function (Registrar $router) {
// Login routes
$router->get('login', ['middleware' => 'guest', 'as' => 'login', 'uses' => 'AuthController@showLogin']);
$router->get('youtube', ['middleware' => 'guest', 'as' => 'login', 'uses' => 'AuthController@postLogin']);
$router->get('logout', ['as' => 'logout', 'uses' => 'AuthController@logoutAction']);
});
}
示例14: map
/**
* Define the auth routes.
*
* @param \Illuminate\Contracts\Routing\Registrar $router
*/
public function map(Registrar $router)
{
$router->group(['as' => 'auth.', 'middleware' => 'app.hasSetting', 'prefix' => 'auth', 'setting' => 'app_name'], function ($router) {
$router->get('login', ['middleware' => 'guest', 'as' => 'login', 'uses' => 'AuthController@showLogin']);
$router->get('signup', ['middleware' => 'guest', 'as' => 'signup', 'uses' => 'SignupController@getSignup']);
$router->post('signup', ['uses' => 'SignupController@postSignup']);
$router->post('login', ['middleware' => ['guest', 'csrf', 'throttling:10,10'], 'uses' => 'AuthController@postLogin']);
$router->get('logout', ['as' => 'logout', 'uses' => 'AuthController@logoutAction', 'middleware' => 'auth']);
});
}
示例15: map
/**
* Define the auth routes.
*
* @param \Illuminate\Contracts\Routing\Registrar $router
*
* @return void
*/
public function map(Registrar $router)
{
$router->group(['as' => 'auth.', 'middleware' => ['web', 'ready'], 'prefix' => 'auth'], function ($router) {
$router->get('login', ['middleware' => 'guest', 'as' => 'login', 'uses' => 'AuthController@showLogin']);
$router->post('login', ['middleware' => ['guest', 'throttling:10,10'], 'uses' => 'AuthController@postLogin']);
$router->get('2fa', ['as' => 'two-factor', 'uses' => 'AuthController@showTwoFactorAuth']);
$router->post('2fa', ['middleware' => ['throttling:10,10'], 'uses' => 'AuthController@postTwoFactor']);
$router->get('logout', ['as' => 'logout', 'uses' => 'AuthController@logoutAction', 'middleware' => 'auth']);
});
}