本文整理汇总了PHP中Illuminate\Support\Facades\Route::patch方法的典型用法代码示例。如果您正苦于以下问题:PHP Route::patch方法的具体用法?PHP Route::patch怎么用?PHP Route::patch使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Illuminate\Support\Facades\Route
的用法示例。
在下文中一共展示了Route::patch方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: function
// Login
Route::get('login', ['as' => 'auth.login', 'uses' => 'AuthController@getLogin']);
Route::post('login', ['as' => 'auth.login.store', 'before' => 'throttle:2,60', 'uses' => 'AuthController@postLogin']);
// Register
//Route::get('register', ['as' => 'auth.register', 'uses' => 'AuthController@getRegister']);
//Route::post('register', ['as' => 'auth.register.store', 'uses' => 'AuthController@postRegister']);
});
Route::group(['middleware' => 'auth'], function () {
// Logout
Route::get('logout', ['as' => 'auth.logout', 'uses' => 'AuthController@getLogout']);
});
});
Route::get('/', 'RotatorController@index');
Route::patch('faucets/checkFaucetsStatus', ['as' => 'checkFaucetsStatus', 'uses' => 'FaucetsController@checkFaucetsStatus']);
Route::patch('faucets/{$slug}', ['as' => 'faucetLowBalance', 'uses' => 'FaucetsController@faucetLowBalance']);
Route::patch('checkFaucetsStatus', 'FaucetsController@checkFaucetsStatus');
Route::get('faucets/progress', 'FaucetsController@progress');
Route::get('/admin/faucets/create', 'FaucetsController@create');
Route::get('/admin/faucets/{slug}/edit', 'FaucetsController@edit');
Route::resource('faucets', 'FaucetsController');
Route::resource('main_meta', 'MainMetaController');
Route::get('/admin/main_meta', 'MainMetaController@index');
Route::resource('admin/twitter_config', 'TwitterConfigController');
Route::get('/admin/twitter_config', 'TwitterConfigController@index');
Route::resource('admin/ad_block_config', 'AdBlockController');
Route::get('/admin/ad_block_config', 'AdBlockController@index');
Route::resource('payment_processors', 'PaymentProcessorsController');
Route::get('payment_processors', 'PaymentProcessorsController@index');
Route::get('/admin/payment_processors/create', 'PaymentProcessorsController@create');
Route::get('/admin/payment_processors/{slug}/edit', 'PaymentProcessorsController@edit');
Route::get('payment_processors/{paymentProcessorSlug}/rotator', 'PaymentProcessorsController@faucets');
示例2: function
<?php
use Illuminate\Support\Facades\Route;
// Administration Routes
Route::get('/', ['as' => 'admin.dashboard.index', 'uses' => 'DashboardController@getIndex']);
// Log Management Routes
Route::post('logs/{logs}/mark-read', ['as' => 'admin.logs.mark-read', 'uses' => 'LogController@markRead']);
Route::resource('logs', 'LogController', ['only' => ['index', 'show', 'destroy'], 'names' => ['index' => 'admin.logs.index', 'show' => 'admin.logs.show', 'destroy' => 'admin.logs.destroy']]);
// End Log Management Routes
// User Management Routes
Route::group(['namespace' => 'User'], function () {
Route::resource('users', 'UserController', ['names' => ['index' => 'admin.users.index', 'create' => 'admin.users.create', 'store' => 'admin.users.store', 'show' => 'admin.users.show', 'edit' => 'admin.users.edit', 'update' => 'admin.users.update', 'destroy' => 'admin.users.destroy']]);
Route::patch('users/{users}/password', ['as' => 'admin.users.password.update', 'uses' => 'PasswordController@update']);
Route::post('users/{users}/check-access', ['as' => 'admin.users.check-access', 'uses' => 'AccessController@postCheck']);
});
// End User Management Routes
// Group Management Routes
Route::resource('roles', 'RoleController', ['names' => ['index' => 'admin.roles.index', 'create' => 'admin.roles.create', 'store' => 'admin.roles.store', 'show' => 'admin.roles.show', 'edit' => 'admin.roles.edit', 'update' => 'admin.roles.update', 'destroy' => 'admin.roles.destroy']]);
// Archive Routes
Route::group(['namespace' => 'Archive'], function () {
// Asset Archive Routes
Route::post('archive/assets/{assets}/restore', ['as' => 'admin.archive.assets.restore', 'uses' => 'AssetController@restore']);
Route::resource('archive/assets', 'AssetController', ['only' => ['index', 'show', 'destroy'], 'names' => ['index' => 'admin.archive.assets.index', 'show' => 'admin.archive.assets.show', 'destroy' => 'admin.archive.assets.destroy']]);
// Work Order Archive Routes
Route::post('archive/work-orders/{work_orders}/restore', ['as' => 'admin.archive.work-orders.restore', 'uses' => 'WorkOrderController@restore']);
Route::resource('archive/work-orders', 'WorkOrderController', ['only' => ['index', 'show', 'destroy'], 'names' => ['index' => 'admin.archive.work-orders.index', 'show' => 'admin.archive.work-orders.show', 'destroy' => 'admin.archive.work-orders.destroy']]);
// Inventory Archive Routes
Route::post('archive/inventory/{inventory}/restore', ['as' => 'admin.archive.inventory.restore', 'uses' => 'InventoryController@restore']);
Route::resource('archive/inventory', 'InventoryController', ['only' => ['index', 'show', 'destroy'], 'names' => ['index' => 'admin.archive.inventory.index', 'show' => 'admin.archive.inventory.show', 'destroy' => 'admin.archive.inventory.destroy']]);
});
// End Archive Routes
示例3: array
Route::get('handle/redirect', array('uses' => 'SubscriptionController@handleRedirect'));
});
//Users
Route::group(['prefix' => 'management'], function () {
Route::get('/', array('uses' => 'UsersManagementController@index'));
Route::get('users/create', array('uses' => 'UsersController@create'));
Route::post('users', array('uses' => 'UsersController@store'));
Route::get('users/{id}', array('uses' => 'UsersController@show'));
Route::get('users/{id}/edit', array('uses' => 'UsersController@edit'));
Route::patch('users/{id}/edit', array('uses' => 'UsersController@update'));
Route::delete('users/{id}', array('uses' => 'UsersController@destroy'));
Route::get('groups/create', array('uses' => 'GroupsController@create'));
Route::post('groups', array('uses' => 'GroupsController@store'));
Route::get('groups/{id}', array('uses' => 'GroupsController@show'));
Route::get('groups/{id}/edit', array('uses' => 'GroupsController@edit'));
Route::patch('groups/{id}/edit', array('uses' => 'GroupsController@update'));
Route::delete('groups/{id}', array('uses' => 'GroupsController@destroy'));
Route::post('manage/groups/{groupId}/add/{userId}', array('uses' => 'UsersGroupsController@addUserToGroup'));
Route::post('manage/groups/{groupId}/remove/{userId}', array('uses' => 'UsersGroupsController@removeUserFromGroup'));
});
//Website
Route::group(['prefix' => 'website'], function () {
Route::get('/', array('uses' => 'WebsiteController@index'));
Route::get('create', array('uses' => 'WebsiteController@create'));
Route::post('create', array('uses' => 'WebsiteController@store'));
Route::delete('delete', array('uses' => 'WebsiteController@destroy'));
});
//CRM
Route::group(['prefix' => 'crm'], function () {
Route::get('/', array('uses' => 'CrmController@index'));
Route::post('crm/activate', ['as' => 'crm.activate', 'uses' => 'CrmController@activateCRM']);
示例4: function
Route::post('oauth/access_token', function () {
return Response::json(Authorizer::issueAccessToken());
});
Route::group(['prefix' => 'api', 'as' => 'api.', 'middleware' => 'oauth'], function () {
Route::get('authenticated', ['uses' => 'Api\\LoggedController@index']);
Route::patch('device_token', ['uses' => 'Api\\LoggedController@updateDeviceToken']);
Route::get('cupom/{code}', ['uses' => 'Api\\CupomController@show']);
//API CLIENT
Route::group(['prefix' => 'client', 'as' => 'client.', 'middleware' => 'oauth.checkrole:client'], function () {
Route::resource('order', 'Api\\Client\\ClientCheckoutController', ['except' => ['create', 'edit', 'destroy']]);
Route::get('products', ['uses' => 'Api\\Client\\ClientProductController@index']);
});
//API DELIVRYMAN
Route::group(['prefix' => 'deliveryman', 'as' => 'deliveryman.', 'middleware' => 'oauth.checkrole:deliveryman'], function () {
Route::resource('order', 'Api\\Deliveryman\\DeliverymanCheckoutController', ['except' => ['create', 'edit', 'destroy', 'store']]);
Route::patch('order/{id}/update-status', ['uses' => 'Api\\Deliveryman\\DeliverymanCheckoutController@updateStatus', 'as' => 'orders.update_status']);
Route::post('order/{id}/geo', ['as' => 'orders.geo', 'uses' => 'Api\\Deliveryman\\DeliverymanCheckoutController@geo']);
});
});
});
//rotas administrativas
Route::group(['prefix' => 'admin', 'as' => 'admin.', 'middleware' => 'auth.checkrole:admin'], function () {
Route::group(['prefix' => 'client'], function () {
Route::get('', ['as' => 'client.index', 'uses' => 'ClientAdminController@index']);
Route::get('create', ['as' => 'client.create', 'uses' => 'ClientAdminController@create']);
Route::get('destroy/{client_id}', ['as' => 'client.destroy', 'uses' => 'ClientAdminController@destroy']);
Route::get('edit/{client_id}', ['as' => 'client.edit', 'uses' => 'ClientAdminController@edit']);
Route::post('store', ['as' => 'client.store', 'uses' => 'ClientAdminController@store']);
Route::post('update/{client_id}', ['as' => 'client.update', 'uses' => 'ClientAdminController@update']);
});
//rota de categorias
示例5: function
Route::group(['prefix' => '/ajax/'], function () {
// Admin Ajax
Route::group(['prefix' => 'admin', 'middleware' => 'acl', 'namespace' => 'Admin'], function () {
Route::post('/home', 'AdminAjaxController@ajaxHome');
Route::post('/setting', 'AdminAjaxController@setting');
Route::patch('/publish', 'AdminAjaxController@ajaxPublish');
Route::post('/help', 'AdminAjaxController@help');
Route::post("/modify", "AdminAjaxController@ajaxModify");
Route::get("/modify", "AdminAjaxController@ajaxModify");
Route::patch('/setusr', 'AdminAjaxController@setusr');
Route::patch('/setportal', 'AdminAjaxController@setportal');
Route::get('/setportal', 'AdminAjaxController@setportal');
Route::get('/setusr', 'AdminAjaxController@setusr');
Route::patch('/muser', 'AdminAjaxController@modifyuser');
Route::post('/save', 'AdminAjaxController@save');
Route::patch('/mportal', 'AdminAjaxController@modifyPortal');
});
Route::group(['prefix' => 'user'], function () {
Route::any('like', 'UserLikeController@create');
Route::post('/save', 'Admin\\AdminAjaxController@save');
});
});
//test domain
Route::group(['prefix' => '/test/', 'namespace' => 'Test'], function () {
Route::get('article', "GlobalTestController@article");
Route::get('paginate', 'GlobalTestController@paginate');
Route::get('testpage', 'GlobalTestController@testpage');
});
//API domain
Route::group(['prefix' => 'api', 'namespace' => 'API'], function () {
///api/sign domain