本文整理汇总了PHP中Illuminate\Support\Facades\Route::post方法的典型用法代码示例。如果您正苦于以下问题:PHP Route::post方法的具体用法?PHP Route::post怎么用?PHP Route::post使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Illuminate\Support\Facades\Route
的用法示例。
在下文中一共展示了Route::post方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _routes_status
public static function _routes_status()
{
$_class = get_called_class();
$_uri = static::$uri;
$_as = static::$action;
Route::post("{$_uri}/status/change", ['as' => "{$_as}.edit.status", 'uses' => "{$_class}@change_status"]);
}
示例2: routes
public static function routes()
{
Route::get('/login', 'AdminLogin@getLogin');
Route::get('/admin-login', 'AdminLogin@getLogin');
Route::get('/admin', 'AdminLogin@forwardAdmin');
Route::post('/admin-login', 'AdminLogin@postLogin');
Route::get('/logout', 'Logout@getLogout');
}
示例3: _routes_switch
public static function _routes_switch()
{
$_class = get_called_class();
$_uri = static::$uri;
$_as = static::$action;
Route::post("{$_uri}/switch/on", ['as' => "{$_as}.edit.switch.on", 'uses' => "{$_class}@switchON"]);
Route::post("{$_uri}/switch/off", ['as' => "{$_as}.edit.switch.off", 'uses' => "{$_class}@switchOFF"]);
}
示例4: _routes_pickup
public static function _routes_pickup()
{
$_class = get_called_class();
$_uri = static::$uri;
$_as = static::$action;
Route::post("{$_uri}/show_picked_up_item", ['as' => "{$_as}.show.picked_up_item", 'uses' => "{$_class}@show_picked_up_item"]);
Route::post("{$_uri}/pick_up_item_search", ['as' => "{$_as}.show.search_pick_up_item", 'uses' => "{$_class}@pick_up_item_search"]);
}
示例5: routes
private function routes()
{
Route::get('/', array('uses' => self::$wardrobeControllers . 'AdminController@index', 'as' => 'wardrobe.admin.index'));
Route::get('logout', array('uses' => self::$wardrobeControllers . 'LoginController@destroy', 'as' => 'wardrobe.admin.logout'));
Route::get('login', array('uses' => self::$wardrobeControllers . 'LoginController@create', 'as' => 'wardrobe.admin.login'));
Route::post('login', array('uses' => self::$wardrobeControllers . 'LoginController@store'));
Route::get('login/remind', array('uses' => self::$wardrobeControllers . 'LoginController@remindForm', 'as' => 'wardrobe.admin.remindForm'));
Route::post('login/remind', array('uses' => self::$wardrobeControllers . 'LoginController@remindSend'));
}
示例6: _routes_trash
public static function _routes_trash()
{
$_class = get_called_class();
$_uri = static::$uri;
$_as = static::$action;
Route::post("{$_uri}/trash", ['as' => "{$_as}.delete.trash", 'uses' => "{$_class}@trash"]);
Route::get("{$_uri}/trashed", ['as' => "{$_as}.delete.trashed", 'uses' => "{$_class}@trashed"]);
Route::post("{$_uri}/restore", ['as' => "{$_as}.delete.restore", 'uses' => "{$_class}@restore"]);
}
示例7: _routes_edit
public static function _routes_edit()
{
$_class = get_called_class();
$_uri = static::$uri;
$_as = static::$action;
Route::get("{$_uri}/edit/{id}", ['as' => "{$_as}.edit.form", 'uses' => "{$_class}@edit"]);
Route::post("{$_uri}/update/{id}", ['as' => "{$_as}.edit.update", 'uses' => "{$_class}@update"]);
Route::get("{$_uri}/create", ['as' => "{$_as}.create.form", 'uses' => "{$_class}@create"]);
Route::post("{$_uri}/store", ['as' => "{$_as}.create.store", 'uses' => "{$_class}@store"]);
}
示例8: boot
/**
* Perform post-registration booting of services.
*
* @return void
*/
public function boot()
{
// Publish pieces
if (!$this->isLumen()) {
$this->publishes([__DIR__ . '/../config/mail-tracker.php' => config_path('mail-tracker.php')], 'config');
$this->publishes([__DIR__ . '/../migrations/2016_03_01_193027_create_sent_emails_table.php' => database_path('migrations/2016_03_01_193027_create_sent_emails_table.php')], 'config');
$this->publishes([__DIR__ . '/../migrations/2016_09_07_193027_create_sent_emails_Url_Clicked_table.php' => database_path('migrations/2016_09_07_193027_create_sent_emails_Url_Clicked_table.php')], 'config');
$this->publishes([__DIR__ . '/../migrations/2016_11_10_213551_add-message-id-to-sent-emails-table.php' => database_path('migrations/2016_11_10_213551_add-message-id-to-sent-emails-table.php')], 'config');
$this->loadViewsFrom(__DIR__ . '/views', 'emailTrakingViews');
$this->publishes([__DIR__ . '/views' => base_path('resources/views/vendor/emailTrakingViews')]);
}
// Hook into the mailer
$this->app['mailer']->getSwiftMailer()->registerPlugin(new MailTracker());
// Install the routes
$config = $this->app['config']->get('mail-tracker.route', []);
$config['namespace'] = 'jdavidbakr\\MailTracker';
if (!$this->isLumen()) {
Route::group($config, function () {
Route::get('t/{hash}', 'MailTrackerController@getT')->name('mailTracker_t');
Route::get('l/{url}/{hash}', 'MailTrackerController@getL')->name('mailTracker_l');
Route::post('sns', 'SNSController@callback')->name('mailTracker_SNS');
});
} else {
$app = $this->app;
$app->group($config, function () use($app) {
$app->get('t', 'MailTrackerController@getT')->name('mailTracker_t');
$app->get('l', 'MailTrackerController@getL')->name('mailTracker_l');
$app->post('sns', 'SNSController@callback')->name('mailTracker_SNS');
});
}
// Install the Admin routes
$config_admin = $this->app['config']->get('mail-tracker.admin-route', []);
$config_admin['namespace'] = 'jdavidbakr\\MailTracker';
if (!$this->isLumen()) {
Route::group($config_admin, function () {
Route::get('/', 'AdminController@getIndex')->name('mailTracker_Index');
Route::post('search', 'AdminController@postSearch')->name('mailTracker_Search');
Route::get('clear-search', 'AdminController@clearSearch')->name('mailTracker_ClearSearch');
Route::get('show-email/{id}', 'AdminController@getShowEmail')->name('mailTracker_ShowEmail');
Route::get('url-detail/{id}', 'AdminController@getUrlDetail')->name('mailTracker_UrlDetail');
Route::get('smtp-detail/{id}', 'AdminController@getSmtpDetail')->name('mailTracker_SmtpDetail');
});
} else {
$app = $this->app;
$app->group($config_admin, function () use($app) {
$app->get('/', 'AdminController@getIndex')->name('mailTracker_Index');
$app->post('search', 'AdminController@postSearch')->name('mailTracker_Search');
$app->get('clear-search', 'AdminController@clearSearch')->name('mailTracker_ClearSearch');
$app->get('show-email/{id}', 'AdminController@getShowEmail')->name('mailTracker_ShowEmail');
$app->get('url-detail/{id}', 'AdminController@getUrlDetail')->name('mailTracker_UrlDetail');
$app->get('smtp-detail/{id}', 'AdminController@getSmtpDetail')->name('mailTracker_SmtpDetail');
});
}
}
示例9: auth
public function auth()
{
$namespace = "\\CodePress\\CodeUser\\Controllers";
Route::group(['namespace' => null], function () use($namespace) {
Route::get('login', "{$namespace}\\Auth\\AuthController@showLoginForm");
Route::post('login', "{$namespace}\\Auth\\AuthController@login");
Route::get('logout', "{$namespace}\\Auth\\AuthController@logout");
Route::get('password/reset/{token?}', "{$namespace}\\Auth\\PasswordController@showResetForm");
Route::post('password/email', "{$namespace}\\Auth\\PasswordController@sendResetLinkEmail");
Route::post('password/reset', "{$namespace}\\Auth\\PasswordController@reset");
});
}
示例10: route
/**
* @param array $tables
*/
public static function route(array $tables)
{
Route::group(Config::get(TableAdmin::PACKAGE_NAME . '::routing'), function () use($tables) {
$parameters = ['table' => '(' . implode('|', $tables) . ')'];
$controller = '\\Shin1x1\\LaravelTableAdmin\\Controller\\TableAdminController';
Route::get('{table}', $controller . '@index')->where($parameters);
Route::get('{table}/create', $controller . '@create')->where($parameters);
Route::post('{table}', $controller . '@store')->where($parameters);
Route::get('{table}/{id}', $controller . '@edit')->where($parameters);
Route::put('{table}/{id}', $controller . '@update')->where($parameters);
Route::delete('{table}/{id}', $controller . '@destroy')->where($parameters);
});
}
示例11: routes
private function routes(Router $router)
{
$router->middleware('djem.auth', \DJEM\Http\Middleware\Authenticate::class);
$router->middlewareGroup('djem.web', [\Illuminate\Cookie\Middleware\EncryptCookies::class, \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class, \Illuminate\Session\Middleware\StartSession::class, \Illuminate\View\Middleware\ShareErrorsFromSession::class, \DJEM\Http\Middleware\VerifyCsrfToken::class]);
Route::group(['middleware' => ['djem.web', 'djem.auth'], 'namespace' => '\\DJEM\\Http\\Controllers'], function () {
Route::any('djem/api', 'Api@getState');
Route::any('djem/api/tree', 'Api\\Main@tree');
Route::any('djem/api/grid', 'Api\\Main@grid');
Route::any('djem/api/content/delete', 'Api\\Content@delete');
Route::any('djem/api/content/load', 'Api\\Content@loadRelation');
Route::get('djem/api/content', 'Api\\Content@get');
Route::post('djem/api/content', 'Api\\Content@set');
Route::get('djem/api/files', 'Api\\Files@get');
Route::post('djem/api/files/upload', 'Api\\Files@upload');
Route::post('djem/api/files', 'Api\\Files@set');
});
Route::get('djem/{file?}', '\\DJEM\\Http\\Controllers\\StaticFiles@get')->where('file', '.*');
}
示例12: register
/**
* Register the service provider.
*
* @return void
*/
public function register()
{
include __DIR__ . '/../../../../../../app/Http/routes.php';
Route::post('validation', function (Request $request) {
$class = $request->class;
$class = str_replace('/', '\\', $class);
$my_request = new $class();
$validator = Validator::make($request->all(), $my_request->rules(), $my_request->messages());
$validator->setAttributeNames($my_request->attributes());
if ($request->ajax()) {
if ($validator->fails()) {
return response()->json(array('success' => false, 'errors' => $validator->getMessageBag()->toArray()));
} else {
return response()->json(array('success' => true));
}
}
});
$this->publishes([__DIR__ . '/views' => base_path('resources/views/vendor/lrgt')]);
}
开发者ID:kidii,项目名称:laravel-form-ajax-validation,代码行数:24,代码来源:LaravelFormAjaxValidationServiceProvider.php
示例13: boot
/**
* Boot the application events.
*
* @return void
*/
public function boot()
{
$this->registerTranslations();
$this->registerConfig();
$this->registerViews();
if (cmsinstalled()) {
if (true || Settings::get('users.users_module_as_home_page')) {
Route::group(['middleware' => ['web', 'user'], 'namespace' => 'cms\\Modules\\Users\\Http\\Controllers\\Frontend'], function () {
Route::get('/', ['as' => 'home', 'uses' => 'UsersController@index']);
});
}
if (Settings::get('users.is_registration_allowed')) {
Route::group(['middleware' => ['web'], 'as' => 'users.', 'namespace' => 'cms\\Modules\\Users\\Http\\Controllers\\Frontend'], function () {
// Registration routes...
Route::get('register', ['as' => 'register', 'uses' => 'RegisterController@showRegistrationForm']);
Route::post('register', 'RegisterController@register');
// Register from social networks
Route::get('register/{provider?}', ['uses' => 'RegisterController@getRegisterFromProvider']);
Route::post('register/{provider?}', ['uses' => 'RegisterController@postRegisterFromProvider']);
});
}
}
}
示例14: function
Route::get('/', ['as' => 'home', 'uses' => 'FrontController@index']);
Route::get('cat/{id}/{slug?}', 'FrontController@showProductByCategory');
Route::get('tag/{id}/{slug?}', 'FrontController@showProductByTag');
Route::get('prod/{id}/{slug?}', 'FrontController@showProduct');
Route::post('storeCart', 'FrontController@storeCart');
Route::get('cart', 'FrontController@showCart');
Route::get('removeCart/{id}', 'FrontController@removeCart');
Route::post('quantityCart', 'FrontController@quantityCart');
Route::post('updateQuantity', 'FrontController@updateQuantity');
Route::get('contact', 'FrontController@showContact');
Route::post('storeContact', 'FrontController@storeContact');
Route::get('account', 'FrontController@account');
Route::get('register', 'RegisterController@register');
Route::post('storeUser', 'RegisterController@storeUser');
Route::group(['middleware' => ['throttle:60,1']], function () {
Route::any('login', 'LoginController@login');
});
Route::get('logout', 'LoginController@logout');
Route::group(['middleware' => ['auth', 'admin']], function () {
Route::resource('product', 'Admin\\ProductController');
Route::get('product/status/{id}', 'Admin\\ProductController@changeStatus');
Route::get('product/remove/{id}', 'Admin\\ProductController@confirmRemove');
Route::get('history', 'Admin\\HistoryController@index');
});
Route::group(['middleware' => ['auth']], function () {
Route::get('validateCart', 'FrontController@validateCart');
Route::get('confirmCart', 'FrontController@confirmCart');
Route::any('customer', 'RegisterController@customer');
Route::post('storeCustomer', 'RegisterController@storeCustomer');
});
});
示例15: function
<?php
use Illuminate\Support\Facades\Route;
/**
* Authentication
*/
Route::group(['prefix' => 'v1', 'middleware' => 'cors'], function () {
Route::any('/auth/fellowshipone', ['as' => 'authEndpoint', 'uses' => 'AuthController@fellowshipone']);
Route::post('auth/register', 'AuthController@register');
Route::get('auth/verify-email', 'AuthController@verifyEmail');
});
/**
* API
*/
Route::group(['prefix' => 'v1', 'middleware' => 'jwt.auth'], function () {
Route::get('/', 'AuthenticateController@index');
});