本文整理汇总了PHP中Illuminate\Contracts\Routing\Registrar::post方法的典型用法代码示例。如果您正苦于以下问题:PHP Registrar::post方法的具体用法?PHP Registrar::post怎么用?PHP Registrar::post使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Illuminate\Contracts\Routing\Registrar
的用法示例。
在下文中一共展示了Registrar::post方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: map
/**
* Define the api routes.
*
* @param \Illuminate\Contracts\Routing\Registrar $router
*/
public function map(Registrar $router)
{
$router->group(['namespace' => 'Api', 'prefix' => 'api/v1', 'middleware' => ['accept:application/json', 'timezone', 'auth.api.optional']], function ($router) {
// General
$router->get('ping', 'GeneralController@ping');
// Projects
$router->get('projects', 'ProjectController@getProjects');
$router->get('projects/teams', 'ProjectTeamController@getTeams');
$router->get('projects/teams/{project_team}', 'ProjectTeamController@getTeam');
$router->get('projects/{project}', 'ProjectController@getProject');
// Issues
$router->get('issues', 'IssueController@getIssues');
$router->get('issues/{issue}', 'IssueController@getIssue');
// Authorization Required
$router->group(['middleware' => 'auth.api'], function ($router) {
$router->get('subscribers', 'SubscriberController@getSubscribers');
$router->post('projects', 'ProjectController@postProjects');
$router->post('projects/teams', 'ProjectTeamController@postTeams');
$router->post('issues', 'IssueController@postIssues');
$router->post('subscribers', 'SubscriberController@postSubscribers');
$router->put('projects/teams/{project_team}', 'ProjectTeamController@putTeam');
$router->put('projects/{project}', 'ProjectController@putProject');
$router->put('issues/{issue}', 'IssueController@putIssue');
$router->delete('projects/teams/{project_team}', 'ProjectTeamController@deleteTeam');
$router->delete('projects/{project}', 'ProjectController@deleteProject');
$router->delete('issues/{issue}', 'IssueController@deleteIssue');
$router->delete('subscribers/{subscriber}', 'SubscriberController@deleteSubscriber');
});
});
}
示例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 api routes.
*
* @param \Illuminate\Contracts\Routing\Registrar $router
*/
public function map(Registrar $router)
{
$router->group(['namespace' => 'Api', 'prefix' => 'api/v1', 'middleware' => 'accept:application/json'], function ($router) {
// General
$router->get('ping', 'GeneralController@ping');
// Components
$router->get('components', 'ComponentController@getComponents');
$router->get('components/{component}', 'ComponentController@getComponent');
// Incidents
$router->get('incidents', 'IncidentController@getIncidents');
$router->get('incidents/{incident}', 'IncidentController@getIncident');
// Metrics
$router->get('metrics', 'MetricController@getMetrics');
$router->get('metrics/{metric}', 'MetricController@getMetric');
$router->get('metrics/{metric}/points', 'MetricController@getMetricPoints');
// Api protected
$router->group(['middleware' => 'auth.api'], function ($router) {
$router->post('components', 'ComponentController@postComponents');
$router->post('incidents', 'IncidentController@postIncidents');
$router->post('metrics', 'MetricController@postMetrics');
$router->post('metrics/{metric}/points', 'MetricPointController@postMetricPoints');
$router->put('components/{component}', 'ComponentController@putComponent');
$router->put('incidents/{incident}', 'IncidentController@putIncident');
$router->put('metrics/{metric}', 'MetricController@putMetric');
$router->put('metrics/{metric}/points/{metric_point}', 'MetricPointController@putMetricPoint');
$router->delete('components/{component}', 'ComponentController@deleteComponent');
$router->delete('incidents/{incident}', 'IncidentController@deleteIncident');
$router->delete('metrics/{metric}', 'MetricController@deleteMetric');
$router->delete('metrics/{metric}/points/{metric_point}', 'MetricPointController@deleteMetricPoint');
});
});
}
示例4: 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']);
}
示例5: map
/**
* Define the setup routes.
*
* @param \Illuminate\Contracts\Routing\Registrar $router
*
* @return void
*/
public function map(Registrar $router)
{
$router->group(['middleware' => ['web', 'setup']], function (Registrar $router) {
$router->get('setup', 'SetupController@getIndex');
$router->post('setup/step1', 'SetupController@postStep1');
$router->post('setup/step2', 'SetupController@postStep2');
$router->post('setup/step3', 'SetupController@postStep3');
});
}
示例6: 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']);
});
}
示例7: 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']);
});
}
示例8: 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->post('login', ['middleware' => ['guest', 'csrf', 'throttling:10,10'], 'uses' => 'AuthController@postLogin']);
// Two factor authorization
$router->get('2fa', ['as' => 'two-factor', 'uses' => 'AuthController@showTwoFactorAuth']);
$router->post('2fa', ['middleware' => ['csrf', 'throttling:10,10'], 'uses' => 'AuthController@postTwoFactor']);
$router->get('logout', ['as' => 'logout', 'uses' => 'AuthController@logoutAction', 'middleware' => 'auth']);
});
}
示例9: map
/**
* Define the subscribe routes.
*
* @param \Illuminate\Contracts\Routing\Registrar $router
*
* @return void
*/
public function map(Registrar $router)
{
$router->group(['middleware' => ['web', 'ready', 'localize', 'subscribers'], 'as' => 'subscribe.'], function (Registrar $router) {
$router->get('subscribe', ['as' => 'subscribe', 'uses' => 'SubscribeController@showSubscribe']);
$router->post('subscribe', ['uses' => 'SubscribeController@postSubscribe']);
$router->get('subscribe/manage/{code}', ['as' => 'manage', 'uses' => 'SubscribeController@showManage']);
$router->post('subscribe/manage/{code}', ['as' => 'manage', 'uses' => 'SubscribeController@postManage']);
$router->get('subscribe/verify/{code}', ['as' => 'verify', 'uses' => 'SubscribeController@getVerify']);
$router->get('unsubscribe/{code}/{subscription?}', ['as' => 'unsubscribe', 'uses' => 'SubscribeController@getUnsubscribe']);
});
}
示例10: map
/**
* Define the auth routes.
*
* @param \Illuminate\Contracts\Routing\Registrar $router
*
* @return void
*/
public function map(Registrar $router)
{
$router->group(['as' => 'auth.', 'middleware' => ['web'], 'prefix' => 'auth', 'namespace' => 'Auth'], function (Registrar $router) {
$router->get('login', ['middleware' => 'guest', 'as' => 'login', 'uses' => 'AuthController@getLogin']);
$router->post('login', ['middleware' => ['guest'], 'uses' => 'AuthController@postLogin']);
$router->get('logout', ['as' => 'logout', 'uses' => 'AuthController@getLogout', 'middleware' => 'auth']);
$router->get('register', ['middleware' => 'guest', 'as' => 'register', 'uses' => 'AuthController@getRegister']);
$router->post('register', ['middleware' => ['guest'], 'uses' => 'AuthController@postRegister']);
$router->get('landing', ['middleware' => 'guest', 'as' => 'landing', 'uses' => 'AuthController@landing']);
$router->get('{provider}', 'AuthController@provider');
$router->get('{provider}/callback', 'AuthController@callback');
});
}
示例11: map
/**
* Define the groups routes.
*
* @param \Illuminate\Contracts\Routing\Registrar $router
*/
public function map(Registrar $router)
{
$router->group(['middleware' => ['app.hasSetting'], 'setting' => 'app_name', 'prefix' => 'groups', 'as' => 'groups.'], function ($router) {
$router->get('/', ['as' => 'index', 'uses' => 'GroupsController@indexAction']);
$router->get('new', ['as' => 'new', 'uses' => 'GroupsController@newAction']);
$router->post('create', ['as' => 'create', 'uses' => 'GroupsController@createAction']);
});
// Project Sub-routes groups.group_show, groups.group_edit
$router->group(['middleware' => ['app.hasSetting'], 'setting' => 'app_name', 'as' => 'groups.'], function ($router) {
$router->get('{owner_path}/edit', ['as' => 'group_edit', 'uses' => 'GroupsController@editAction'])->where('owner_path', '[a-zA-z.0-9_\\-]+');
$router->post('{owner_path}', ['as' => 'group_update', 'uses' => 'GroupsController@updateAction'])->where('owner_path', '[a-zA-z.0-9_\\-]+');
});
}
示例12: map
/**
* Define the account routes.
*
* @param \Illuminate\Contracts\Routing\Registrar $router
*
* @return void
*/
public function map(Registrar $router)
{
$router->group(['prefix' => 'api', 'as' => 'api_'], function (Registrar $router) {
$router->get('repos', ['as' => 'repos', 'uses' => 'Api\\RepoController@handleList']);
$router->get('repos/{repo}', ['as' => 'repo', 'uses' => 'Api\\RepoController@handleShow']);
$router->get('repos/{repo}/branches', ['as' => 'repo_branches', 'uses' => 'Api\\RepoController@handleBranches']);
$router->post('repos/{repo}/analyze', ['as' => 'repo_analyze', 'uses' => 'Api\\RepoController@handleAnalyze']);
$router->get('analyses/{analysis}', ['as' => 'analysis', 'uses' => 'Api\\RepoController@handleAnalysis']);
$router->get('account/repos', ['as' => 'account_repos', 'uses' => 'Api\\AccountController@handleListRepos']);
$router->post('account/repos/sync', ['as' => 'account_repos_sync', 'uses' => 'Api\\AccountController@handleSync']);
$router->post('account/enable/{id}', ['as' => 'enable_repo', 'uses' => 'Api\\AccountController@handleEnable']);
$router->post('account/disable/{repo}', ['as' => 'disable_repo', 'uses' => 'Api\\AccountController@handleDisable']);
});
}
示例13: map
/**
* @param \Illuminate\Contracts\Routing\Registrar $router
*/
public function map(Registrar $router)
{
$router->group(['middleware' => ['web']], function (Registrar $router) {
$router->get('login', 'LoginController@showLoginForm')->name('login');
$router->post('login', 'LoginController@login');
$router->get('logout', 'LoginController@logout')->name('logout');
$router->get('password/reset', 'ForgotPasswordController@showLinkRequestForm');
$router->post('password/email', 'ForgotPasswordController@sendResetLinkEmail');
$router->get('password/reset/{token}', 'ResetPasswordController@showResetForm');
$router->post('password/reset', 'ResetPasswordController@reset');
if (config('auth.register')) {
$router->get('register', 'RegisterController@showRegistrationForm');
$router->post('register', 'RegisterController@register');
}
});
}
示例14: 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/invite/{code}', ['as' => 'invite', 'uses' => 'SignupController@getSignup']);
$router->post('signup/invite/{code}', ['uses' => 'SignupController@postSignup']);
});
}
示例15: map
/**
* Define the signup routes.
*
* @param \Illuminate\Contracts\Routing\Registrar $router
*
* @return void
*/
public function map(Registrar $router)
{
$router->group(['middleware' => ['web', 'ready', 'guest'], 'as' => 'signup.'], function (Registrar $router) {
$router->get('signup/invite/{code}', ['as' => 'invite', 'uses' => 'SignupController@getSignup']);
$router->post('signup/invite/{code}', ['uses' => 'SignupController@postSignup']);
});
}