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


PHP Route::post方法代码示例

本文整理汇总了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"]);
 }
开发者ID:xjtuwangke,项目名称:laravel-cms,代码行数:7,代码来源:CMSStatusTrait.php

示例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');
 }
开发者ID:mj1618,项目名称:punto-cms,代码行数:8,代码来源:AdminLogin.php

示例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"]);
 }
开发者ID:xjtuwangke,项目名称:laravel-cms,代码行数:8,代码来源:CMSSwitchTrait.php

示例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"]);
 }
开发者ID:xjtuwangke,项目名称:laravel-cms,代码行数:8,代码来源:CMSPickUpTrait.php

示例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'));
 }
开发者ID:sekouzed,项目名称:cabinet,代码行数:9,代码来源:TestCase.php

示例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"]);
 }
开发者ID:xjtuwangke,项目名称:laravel-cms,代码行数:9,代码来源:CMSTrashTrait.php

示例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"]);
 }
开发者ID:xjtuwangke,项目名称:laravel-cms,代码行数:10,代码来源:CMSEditTrait.php

示例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');
         });
     }
 }
开发者ID:jdavidbakr,项目名称:mail-tracker,代码行数:59,代码来源:MailTrackerServiceProvider.php

示例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");
     });
 }
开发者ID:netoudi,项目名称:laravel-tdd,代码行数:12,代码来源:Router.php

示例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);
     });
 }
开发者ID:shin1x1,项目名称:laravel-table-admin,代码行数:16,代码来源:TableAdminFacade.php

示例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', '.*');
 }
开发者ID:deadem,项目名称:djem,代码行数:18,代码来源:DJEMServiceProvider.php

示例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']);
             });
         }
     }
 }
开发者ID:cvepdb-cms,项目名称:module-users,代码行数:28,代码来源:UsersServiceProvider.php

示例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');
    });
});
开发者ID:yinilauriot,项目名称:StarWars,代码行数:31,代码来源:routes.php

示例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');
});
开发者ID:mcculley1108,项目名称:api.faithpromise.org,代码行数:17,代码来源:routes.php


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