本文整理汇总了PHP中Route::delete方法的典型用法代码示例。如果您正苦于以下问题:PHP Route::delete方法的具体用法?PHP Route::delete怎么用?PHP Route::delete使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Route
的用法示例。
在下文中一共展示了Route::delete方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: routes
function routes($config)
{
// only mess with the cms
Route::group(['prefix' => $config['cms_path'], 'middleware' => ['cms.language', 'cms.view']], function () use($config) {
Route::group(['namespace' => '\\Thorazine\\Cms\\Http\\Controllers'], function () use($config) {
// pickup on first contact
Route::get('/', ['as' => 'cms.auth.first', 'uses' => 'AuthController@first']);
Route::post('/', ['as' => 'cms.auth.first.create', 'uses' => 'AuthController@create']);
// auth
Route::post('/login/submit', ['as' => 'cms.auth.check', 'before' => 'csrf', 'uses' => 'AuthController@check']);
Route::get('/login', ['as' => 'cms.auth.login', 'uses' => 'AuthController@index']);
// All routes that do require auth
Route::group(['middleware' => ['cms.auth']], function () use($config) {
// logout
Route::get('/logout', ['as' => 'cms.auth.logout', 'uses' => 'AuthController@destroy']);
// cms home
Route::get('/base', ['as' => 'cms.base', 'uses' => 'CmsController@index']);
// flexible auth routes
Route::group(['middleware' => ['cms.model']], function () use($config) {
// flexible restfull routes
Route::get('/{module}/{model}/index', ['as' => 'module.model.index', 'uses' => 'PreController@index']);
Route::get('/{module}/{model}/create', ['as' => 'module.model.create', 'uses' => 'PreController@create']);
Route::post('/{module}/{model}/store', ['as' => 'module.model.store', 'uses' => 'PreController@store']);
Route::get('/{module}/{model}/show/{id}', ['as' => 'module.model.show', 'uses' => 'PreController@show']);
Route::get('/{module}/{model}/edit/{id}', ['as' => 'module.model.edit', 'uses' => 'PreController@edit']);
Route::put('/{module}/{model}/update/{id}', ['as' => 'module.model.update', 'uses' => 'PreController@update']);
Route::delete('/{module}/{model}/destroy/{id}', ['as' => 'module.model.destroy', 'uses' => 'PreController@destroy']);
Route::post('/{module}/{model}/order', ['as' => 'module.model.order', 'uses' => 'PreController@order']);
Route::get('/{module}/{model}/{action}', ['as' => 'module.model.action', 'uses' => 'PreController@custom']);
});
});
});
});
}
示例2: install
/**
* Install route patterns.
*
* @param null $baseUri
*/
public static function install($baseUri = null)
{
$baseUri = $baseUri ? "{$baseUri}/" : "";
\Route::post($baseUri . "resources/bulk/{resource}", "Foothing\\RepositoryController\\Controllers\\ResourceController@postBulk");
\Route::put($baseUri . "resources/bulk/{resource}", "Foothing\\RepositoryController\\Controllers\\ResourceController@putBulk");
\Route::put($baseUri . "resources/{resource}/{id}/link/{relation}/{related}/{relatedId}", "Foothing\\RepositoryController\\Controllers\\ResourceController@putLink");
\Route::delete($baseUri . "resources/{resource}/{id}/link/{relation}/{related}/{relatedId}", "Foothing\\RepositoryController\\Controllers\\ResourceController@deleteLink");
\Route::get($baseUri . "resources/{resource}/{id?}/{args?}", "Foothing\\RepositoryController\\Controllers\\ResourceController@getIndex")->where('args', '[a-zA-Z0-9/_]*');
\Route::put($baseUri . "resources/{resource}/{id}", "Foothing\\RepositoryController\\Controllers\\ResourceController@putIndex");
\Route::delete($baseUri . "resources/{resource}/{id}", "Foothing\\RepositoryController\\Controllers\\ResourceController@deleteIndex");
\Route::post($baseUri . "resources/{resource}", "Foothing\\RepositoryController\\Controllers\\ResourceController@postIndex");
}
示例3: returnRoutes
public static function returnRoutes($prefix = null)
{
$class = __CLASS__;
if (Auth::check() && Auth::user()->group_id == 3) {
Route::group(array('before' => '', 'prefix' => 'admin'), function () use($class) {
Route::get('participants', array('as' => 'moderator.participants', 'uses' => $class . '@participantsList'));
Route::post('participant/{user_id}/save', array('before' => 'csrf', 'as' => 'moderator.participants.save', 'uses' => $class . '@participantsSave'));
Route::get('participants/{params}', array('as' => 'moderator.participants.lists', 'uses' => $class . '@participantsLists'))->where('params', '(all|phone|email)');
Route::post('participants/{params}', array('as' => 'moderator.participants.lists', 'uses' => $class . '@participantsListsImport'));
Route::get('participants/{user_id}/edit', array('as' => 'moderator.participants.edit', 'uses' => $class . '@participantsEdit'));
Route::post('participants/{user_id}/update', array('as' => 'moderator.participants.update', 'uses' => $class . '@participantsUpdate'));
Route::get('casting', array('as' => 'moderator.casting', 'uses' => $class . '@casting'));
Route::post('casting/{params}', array('as' => 'moderator.casting.import', 'uses' => $class . '@castingListsImport'));
Route::delete('casting/{casting_id}/destroy', array('as' => 'moderator.casting.delete', 'uses' => $class . '@castingDelete'));
});
Route::get('participants/{user_id}/status/{status_number}', array('as' => 'moderator.participants.status', 'uses' => $class . '@participantsSetStatus'));
}
}
示例4: returnRoutes
public static function returnRoutes($prefix = null)
{
$class = __CLASS__;
$entity = self::$entity;
Route::any('/ajax/check-dicval-slug-unique', array('as' => 'dicval.check-dicval-slug-unique', 'uses' => $class . "@postAjaxCheckDicvalSlugUnique"));
Route::group(array('before' => 'auth', 'prefix' => $prefix . "/" . $class::$group), function () use($class, $entity) {
Route::post($entity . '/ajax-order-save', array('as' => 'dicval.order', 'uses' => $class . "@postAjaxOrderSave"));
Route::post($entity . '/ajax-nested-set-model', array('as' => 'dicval.nestedsetmodel', 'uses' => $class . "@postAjaxNestedSetModel"));
Route::get($entity . '/{dic_slug}/{entity_id}/restore', array('as' => 'dicval.restore', 'uses' => $class . '@restore'));
Route::resource('dic.val', $class, array('except' => array('show'), 'names' => array('index' => 'dicval.index', 'create' => 'dicval.create', 'store' => 'dicval.store', 'edit' => 'dicval.edit', 'update' => 'dicval.update', 'destroy' => 'dicval.destroy')));
});
Route::group(array('before' => 'auth', 'prefix' => $prefix), function () use($class, $entity) {
Route::resource('/entity/{dic_slug}/', $class, array('except' => array('show', 'edit', 'update', 'destroy'), 'names' => array('index' => 'entity.index', 'create' => 'entity.create', 'store' => 'entity.store')));
Route::get('/entity/{dic_slug}/{entity_id}/edit', array('as' => 'entity.edit', 'uses' => $class . '@edit'));
Route::put('/entity/{dic_slug}/{entity_id}/update', array('as' => 'entity.update', 'uses' => $class . '@update'));
Route::delete('/entity/{dic_slug}/{entity_id}', array('as' => 'entity.destroy', 'uses' => $class . '@destroy'));
Route::get('/entity/{dic_slug}/{entity_id}/restore', array('as' => 'entity.restore', 'uses' => $class . '@restore'));
});
}
示例5: registerCommands
private function registerCommands()
{
Route::group(['prefix' => 'man', 'before' => 'manage.auth.basic'], function () {
Route::any('content/blocks', ContentBlockController::class . '@index');
Route::post('content/blocks/store', ContentBlockController::class . '@store');
Route::post('content/blocks/{id}', ContentBlockController::class . '@update');
Route::delete('content/blocks/{id}', ContentBlockController::class . '@delete');
Route::any('service/titles', ServiceTitleController::class . '@index');
Route::post('service/titles/{id}', ServiceTitleController::class . '@update');
Route::get('requests', OrderRequestController::class . '@index');
Route::any('reporter', ReportController::class . '@index');
Route::any('reporter/invite/stat', ReportController::class . '@inviteStat');
Route::any('reporter/reviews', ReportController::class . '@orderReviews');
Route::any('autopays', AutoPayController::class . '@index');
Route::any('autopays/orders/{cid}', AutoPayController::class . '@orders');
Route::any('autopays/start/{order_id}/{customer_id}', AutoPayController::class . '@start');
Route::any('autopays/check_customers_orders/{customer_id}', AutoPayController::class . '@checkCustomersOrders');
Route::any('autopays/autopay_all', AutoPayController::class . '@autopayAll');
});
}
示例6: env
<?php
Route::get('admin/experiences', ['uses' => 'AdminExperiencesController@index', 'as' => 'AdminExperiences', 'middleware' => [], 'where' => [], 'domain' => env('WEBSITE_URL')]);
Route::get('admin/review', ['uses' => 'AdminExperienceLocationsController@review', 'as' => 'AdminReview', 'middleware' => [], 'where' => [], 'domain' => env('WEBSITE_URL')]);
Route::get('admin/expreviewadd', ['uses' => 'AdminExperienceLocationsController@expReviewAdd', 'as' => 'reviewexpAdd', 'middleware' => [], 'where' => [], 'domain' => env('WEBSITE_URL')]);
Route::post('admin/experienceReviewAdd', ['uses' => 'AdminExperienceLocationsController@experienceReviewAdd', 'as' => 'experienceReviewAdd', 'middleware' => [], 'where' => [], 'domain' => env('WEBSITE_URL')]);
Route::get('admin/alacreviewadd', ['uses' => 'AdminExperienceLocationsController@alaReviewAdd', 'as' => 'alaReviewAdd', 'middleware' => [], 'where' => [], 'domain' => env('WEBSITE_URL')]);
Route::post('admin/alacarteReviewAdd', ['uses' => 'AdminExperienceLocationsController@alacarteReviewAdd', 'as' => 'alacarteReviewAdd', 'middleware' => [], 'where' => [], 'domain' => env('WEBSITE_URL')]);
Route::get('expreview/edit/{id}', ['uses' => 'AdminExperienceLocationsController@expReviewUpdate', 'as' => 'reviewUpdate', 'middleware' => [], 'where' => [], 'domain' => env('WEBSITE_URL')]);
Route::post('admin/expreview/updatesave', ['uses' => 'AdminExperienceLocationsController@expReviewUpdateSave', 'as' => 'expReviewUpdateSave', 'middleware' => [], 'where' => [], 'domain' => env('WEBSITE_URL')]);
Route::post('admin/alacarte/updatesave', ['uses' => 'AdminExperienceLocationsController@alaReviewUpdateSave', 'as' => 'alaReviewUpdateSave', 'middleware' => [], 'where' => [], 'domain' => env('WEBSITE_URL')]);
Route::get('alacartereview/edit/{id}', ['uses' => 'AdminExperienceLocationsController@alacarteReviewUpdate', 'as' => 'alacarteReviewUpdate', 'middleware' => [], 'where' => [], 'domain' => env('WEBSITE_URL')]);
Route::post('/admin/show_exp_review_update', ['uses' => 'AdminExperienceLocationsController@showExperienceReview', 'as' => 'showExperienceReview', 'middleware' => [], 'where' => [], 'domain' => env('WEBSITE_URL')]);
Route::post('/admin/show_alacart_review_update', ['uses' => 'AdminExperienceLocationsController@showAlacarteReview', 'as' => 'showAlacarteReview', 'middleware' => [], 'where' => [], 'domain' => env('WEBSITE_URL')]);
Route::get('admin/reviewalacarte', ['uses' => 'AdminExperienceLocationsController@reviewAlacarte', 'as' => 'reviewAlacarte', 'middleware' => [], 'where' => [], 'domain' => env('WEBSITE_URL')]);
Route::get('admin/experiences/create', ['uses' => 'AdminExperiencesController@create', 'as' => 'AdminExperienceCreate', 'middleware' => [], 'where' => [], 'domain' => env('WEBSITE_URL')]);
Route::post('admin/experiences/', ['uses' => 'AdminExperiencesController@store', 'as' => 'AdminExperienceStore', 'middleware' => [], 'where' => [], 'domain' => env('WEBSITE_URL')]);
Route::get('admin/experiences/{id}', ['uses' => 'AdminExperiencesController@show', 'as' => 'AdminExperienceShow', 'middleware' => [], 'where' => [], 'domain' => env('WEBSITE_URL')]);
Route::get('admin/experiences/{id}/edit', ['uses' => 'AdminExperiencesController@edit', 'as' => 'AdminExperienceEdit', 'middleware' => [], 'where' => ['id' => '\\d+'], 'domain' => env('WEBSITE_URL')]);
Route::get('admin/experiences/locations/{id}/edit', ['uses' => 'AdminExperienceLocationsController@edit', 'as' => 'AdminExperienceLocationsEdit', 'middleware' => [], 'where' => ['id' => '\\d+'], 'domain' => env('WEBSITE_URL')]);
Route::put('admin/experiences/{id}', ['uses' => 'AdminExperiencesController@update', 'as' => 'AdminExperienceUpdate', 'middleware' => [], 'where' => ['id' => '\\d+'], 'domain' => env('WEBSITE_URL')]);
Route::put('admin/experiences/locations/{id}', ['uses' => 'AdminExperienceLocationsController@update', 'as' => 'AdminExperienceLocationsUpdate', 'middleware' => [], 'where' => ['id' => '\\d+'], 'domain' => env('WEBSITE_URL')]);
Route::delete('admin/experiences/{id}', ['uses' => 'AdminExperiencesController@destroy', 'as' => 'AdminExperienceDelete', 'middleware' => [], 'where' => [], 'domain' => env('WEBSITE_URL')]);
Route::resource('admin/experience/variants', 'AdminExperienceVariantsController', ['middleware' => [], 'where' => [], 'domain' => env('WEBSITE_URL')]);
Route::resource('admin/experience/complex', 'AdminComplexExperiencesController', ['middleware' => [], 'where' => [], 'domain' => env('WEBSITE_URL')]);
Route::resource('admin/experience/locations', 'AdminExperienceLocationsController', ['middleware' => [], 'where' => [], 'domain' => env('WEBSITE_URL')]);
Route::post('admin/experience/locations/getVendorLocationsDetails', ['uses' => 'AdminExperienceLocationsController@getVendorLocationsDetails', 'middleware' => [], 'where' => [], 'domain' => env('WEBSITE_URL')]);
Route::post('/admin/experience/location/ajax_sort', ['uses' => 'AdminExperienceLocationsController@experienceSortOrder', 'middleware' => [], 'where' => [], 'domain' => env('WEBSITE_URL')]);
Route::get('/admin/experiences/location/{cityval}', ['uses' => 'AdminExperienceLocationsController@getExperienceScheduleCity', 'middleware' => [], 'where' => [], 'domain' => env('WEBSITE_URL')]);
Route::match(['get', 'post'], 'admin/experiences/deactive_Addon/{id}', ['uses' => 'AdminExperiencesController@deactive_Addon', 'middleware' => [], 'domain' => env('WEBSITE_URL')]);
示例7: function
<?php
Route::group(['middleware' => 'logged_in'], function () {
Route::get('/', ['as' => 'home', 'uses' => 'HomeController@index']);
// Authentication routes
Route::get('auth/login', ['as' => 'login', 'uses' => 'Auth\\AuthController@getLogin']);
Route::post('auth/login', ['as' => 'doLogin', 'uses' => 'Auth\\AuthController@postLogin']);
Route::get('auth/logout', ['as' => 'doLogout', 'uses' => 'Auth\\AuthController@getLogout']);
Route::group(['middleware' => 'auth'], function () {
Route::get('dashboard', ['as' => 'dashboard', 'uses' => 'HomeController@dashboard']);
Route::group(['prefix' => 'notes'], function () {
Route::get('/', ['as' => 'notes.index', 'uses' => 'NotesController@index']);
Route::get('all', ['as' => 'notes.all', 'uses' => 'NotesController@all']);
Route::post('/', ['as' => 'notes.save', 'uses' => 'NotesController@save']);
Route::post('/{id}', ['as' => 'notes.update', 'uses' => 'NotesController@update']);
Route::delete('/{id}', ['as' => 'notes.destroy', 'uses' => 'NotesController@destroy']);
});
Route::group(['prefix' => 'tasks'], function () {
Route::get('/bycategory/{id}', ['as' => 'tasks.bycategory', 'uses' => 'TasksController@byCategory']);
Route::get('/categories', ['as' => 'task-categories.all', 'uses' => 'TaskCategoryController@all']);
Route::post('/categories', ['as' => 'task-categories.save', 'uses' => 'TaskCategoryController@save']);
Route::post('/categories/{id}', ['as' => 'task-categories.update', 'uses' => 'TaskCategoryController@update']);
Route::delete('/categories/{id}', ['as' => 'task-categories.destroy', 'uses' => 'TaskCategoryController@destroy']);
Route::get('/', ['as' => 'tasks.index', 'uses' => 'TasksController@index']);
Route::get('all', ['as' => 'tasks.all', 'uses' => 'TasksController@all']);
Route::post('/', ['as' => 'tasks.save', 'uses' => 'TasksController@save']);
Route::post('/{id}', ['as' => 'tasks.update', 'uses' => 'TasksController@update']);
Route::delete('/{id}', ['as' => 'tasks.destroy', 'uses' => 'TasksController@destroy']);
});
});
});
示例8: function
<?php
Route::get('/', 'Controller@index');
Route::get('/tasks', 'TasksController@getTasksAll');
Route::get('/tasks/{id}', 'TasksController@getTaskById');
Route::post('/tasks', 'TasksController@createTask');
Route::put('/tasks/{id}', 'TasksController@updateTaskById');
Route::delete('/tasks/{id}', 'TasksController@deleteTaskById');
/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| This route group applies the "web" middleware group to every route
| it contains. The "web" middleware group is defined in your HTTP
| kernel and includes session state, CSRF protection, and more.
|
*/
/*
Route::group(['middleware' => ['web']], function () {
//
});
*/
示例9:
*/
// //////////////////////////////
// Index + News
// [ GET ]
Route::get('/', 'IndexController@index');
// All news
Route::get('/news', 'NewsController@all');
// View news post
Route::get('/news/{id}', 'NewsController@post');
// View post editor
Route::get('/news/{id}/edit', 'NewsController@post_edit');
// [ POST ]
// Update current view
Route::post('/news/{id}', 'NewsController@post_edit_save');
// [ DELETE ]
Route::delete('/news/{id}', 'NewsController@post_delete');
///////////////////////////////// Index + News END
///
///
///
// //////////////////////////////
// Authentication
// [ GET ]
Route::get('/auth/login', 'Auth\\AuthController@getLogin');
Route::get('/auth/logout', 'Auth\\AuthController@getLogout');
Route::get('/auth/register', 'Auth\\AuthController@getRegister');
// [ POST ]
Route::post('/auth/login', 'Auth\\AuthController@postLogin');
Route::post('/auth/register', 'Auth\\AuthController@postRegister');
///////////////////////////////// Auth END
///
示例10: array
Route::match(array('GET', 'POST'), 'admin', array('as' => 'admin', 'before' => 'isAdmin', 'uses' => 'AdminController@adminQuery'));
Route::get('close', array('as' => 'close', function () {
if (!Session::has('module')) {
return Redirect::route('/');
}
return Response::view('close');
}));
Route::get('module/login', array('as' => 'module-login', function () {
if (Session::has('user')) {
return Redirect::route('module', array('uuid' => Input::get('uuid')));
}
return Response::view('module');
}));
Route::post('module/auth', array('before' => 'module-auth', 'uses' => 'AuthController@authModule'));
Route::get('module/auth', array('uses' => 'AuthController@getAuthModule'));
Route::delete('module/auth', array('uses' => 'AuthController@deauthModule'));
Route::post('module/ping.php', array('uses' => 'MarkerSiteController@autoPostModule'));
Route::get('module', array('as' => 'module', 'before' => 'module', function () {
$moduleUUID = Input::get('uuid');
Session::set('module', $moduleUUID);
$moduleAuth = DB::table('auth')->where('token', '=', $moduleUUID)->first();
$moduleHasSite = $moduleAuth != NULL ? 1 : 0;
if (Session::has(user)) {
$user = Session::get(user);
Log::info('Logged user: ' . $user->uid);
$privileges = DB::table('auth')->where('token', '=', $user->uid)->lists('atlas_id');
$list = json_encode($privileges);
Log::info('Authorized site: ' . $list);
Log::info('Authorized module: ' . $moduleUUID);
Log::info('Module attached: ' . $moduleHasSite);
return View::make('index', array('user' => $user, 'auth_site' => $list, 'moduleUUID' => $moduleUUID, 'moduleHasSite' => $moduleHasSite));
示例11: redirect
return redirect()->back(1);
}]);
// Routes del Profesor **********************************
Route::group(['middleware' => ['auth', 'is_profesor']], function () {
Route::get('profesor/consultarproyecto', ['as' => 'profesor.consultarproyecto', 'uses' => 'ProfesorActionController@consultProject']);
Route::get('profesor/evaluarproyecto/{id}', ['as' => 'profesor.evaluarproyecto', 'uses' => 'ProfesorActionController@evaluarProject']);
Route::get('profesor/verpdfs/{id_user}', ['as' => 'profesor.verpdfs', 'uses' => 'ProfesorActionController@verPdfs']);
Route::delete('profesor/destroypdf/{id}', ['as' => 'profesor.destroypdf', 'uses' => 'ProfesorActionController@destroyPdf']);
Route::get('profesor/verevaluaciones/{id}', ['as' => 'profesor.verevaluaciones', 'uses' => 'ProfesorActionController@showEvaluations']);
Route::get('profesor/evaluarproyecto/{id_user}', ['as' => 'profesor.evaluarproyecto', 'uses' => 'ProfesorActionController@evaluarProject']);
Route::post('profesor/storeevaluacion', ['as' => 'profesor.evaluacion.store', 'uses' => 'ProfesorActionController@storeEvaluation']);
Route::get('profesor/actualizarevaluacion/{id_user}', ['as' => 'profesor.actualizarevaluacion', 'uses' => 'ProfesorActionController@editEvaluation']);
Route::put('profesor/updateevaluacion/{id_user}', ['as' => 'profesor.evaluacion.update', 'uses' => 'ProfesorActionController@updateEvaluation']);
Route::get('profesor/detalledeevaluacion/{id_user}/{id_evaluador}', ['as' => 'profesor.evaluaciondetalle', 'uses' => 'ProfesorActionController@detailEvaluation']);
Route::get('profesor/cambiar-password', ['as' => 'profesor.cambiar', 'uses' => 'ProfesorActionController@changePassword']);
Route::put('profesor/update-password', ['as' => 'profesor.update.password', 'uses' => 'ProfesorActionController@updatePassword']);
Route::resource('profesor', 'ProfesorActionController');
});
// Routes del Estudiante **********************************
Route::group(['middleware' => ['auth', 'is_estudiante']], function () {
Route::get('estudiante/miproyecto/{id_user}', ['as' => 'estudiante.miproyecto', 'uses' => 'EstudianteActionController@miProyecto']);
Route::get('estudiante/mispdf/{id_user}', ['as' => 'estudiante.mispdf', 'uses' => 'EstudianteActionController@getListPdfs']);
Route::post('estudiante/storepdf/{id_user}', ['as' => 'estudiante.mispdf.store', 'uses' => 'EstudianteActionController@subirPdf']);
Route::get('estudiante/evaluaciondetalle/{id_user}', ['as' => 'estudiante.evaluaciondetalle', 'uses' => 'EstudianteActionController@getDetailsEvaluation']);
Route::delete('estudiante/destroypdf/{id}', ['as' => 'estudiante.destroypdf', 'uses' => 'EstudianteActionController@destroyPdf']);
Route::get('estudiante/misevaluacione/{id_user}', ['as' => 'estudiante.misevaluaciones', 'uses' => 'EstudianteActionController@showEvaluations']);
Route::get('estudiante/detallesdeevaluacion/{id_user}/{id_evaluador}', ['as' => 'estudiante.evaluaciondetalle', 'uses' => 'EstudianteActionController@detailEvaluation']);
Route::get('estudiante/cambiar-contraseña', ['as' => 'estudiante.cambiar', 'uses' => 'EstudianteActionController@changePassword']);
Route::put('estudiante/update-password', ['as' => 'estudiante.update.password', 'uses' => 'EstudianteActionController@updatePassword']);
Route::resource('estudiante', 'EstudianteActionController');
});
示例12: function
# ------------------ Votes ------------------------
Route::group(['before' => 'auth'], function () {
Route::post('/topics/{id}/upvote', ['as' => 'topics.upvote', 'uses' => 'TopicsController@upvote']);
Route::post('/topics/{id}/downvote', ['as' => 'topics.downvote', 'uses' => 'TopicsController@downvote']);
Route::post('/replies/{id}/vote', ['as' => 'replies.vote', 'uses' => 'RepliesController@vote']);
Route::post('/topics/{id}/append', ['as' => 'topics.append', 'uses' => 'TopicsController@append']);
});
# ------------------ Admin Route ------------------------
Route::group(['before' => 'manage_topics'], function () {
Route::post('topics/recomend/{id}', ['as' => 'topics.recomend', 'uses' => 'TopicsController@recomend']);
Route::post('topics/wiki/{id}', ['as' => 'topics.wiki', 'uses' => 'TopicsController@wiki']);
Route::post('topics/pin/{id}', ['as' => 'topics.pin', 'uses' => 'TopicsController@pin']);
Route::post('topics/sink/{id}', ['as' => 'topics.sink', 'uses' => 'TopicsController@sink']);
});
Route::delete('topics/delete/{id}', ['as' => 'topics.destroy', 'uses' => 'TopicsController@destroy']);
Route::delete('account/topics/delete/{id}', ['as' => 'ac.topics.destroy', 'uses' => 'TopicsController@destroy']);
Route::group(['before' => 'manage_users'], function () {
Route::post('users/blocking/{id}', ['as' => 'users.blocking', 'uses' => 'UsersController@blocking']);
});
Route::post('upload_image', ['as' => 'upload_image', 'uses' => 'TopicsController@uploadImage', 'before' => 'auth']);
// Health Checking
Route::get('heartbeat', function () {
return Node::first();
});
Route::get('/github-api-proxy/users/{username}', ['as' => 'users.github-api-proxy', 'uses' => 'UsersController@githubApiProxy']);
Route::get('/github-card', ['as' => 'users.github-card', 'uses' => 'UsersController@githubCard']);
#-------------------register System-------------
Route::get('/ow_login', ['as' => 'ow_login', 'uses' => 'ow_AuthController@show_login']);
Route::post('/ow_login', ['as' => 'Do_Login', 'uses' => 'ow_AuthController@Do_Login']);
Route::get('/ow_register', ['as' => 'ow_register', 'uses' => 'ow_AuthController@show_register']);
Route::post('/ow_register', ['as' => 'ow_register', 'uses' => 'ow_AuthController@ow_Auth_register']);
示例13:
Route::post('forgot', ['as' => 'sentinel.reset.request', 'uses' => 'RegistrationController@sendResetPasswordEmail']);
Route::get('reset/{hash}/{code}', ['as' => 'sentinel.reset.form', 'uses' => 'RegistrationController@passwordResetForm']);
Route::post('reset/{hash}/{code}', ['as' => 'sentinel.reset.password', 'uses' => 'RegistrationController@resetPassword']);
// Sentinel Profile
Route::get('profile', ['as' => 'sentinel.profile.show', 'uses' => 'ProfileController@show']);
Route::get('profile/edit', ['as' => 'sentinel.profile.edit', 'uses' => 'ProfileController@edit']);
Route::put('profile', ['as' => 'sentinel.profile.update', 'uses' => 'ProfileController@update']);
Route::post('profile/password', ['as' => 'sentinel.profile.password', 'uses' => 'ProfileController@changePassword']);
// Sentinel Users
Route::get('users', ['as' => 'sentinel.users.index', 'uses' => 'UserController@index']);
Route::get('users/create', ['as' => 'sentinel.users.create', 'uses' => 'UserController@create']);
Route::post('users', ['as' => 'sentinel.users.store', 'uses' => 'UserController@store']);
Route::get('users/{hash}', ['as' => 'sentinel.users.show', 'uses' => 'UserController@show']);
Route::get('users/{hash}/edit', ['as' => 'sentinel.users.edit', 'uses' => 'UserController@edit']);
Route::post('users/{hash}/password', ['as' => 'sentinel.password.change', 'uses' => 'UserController@changePassword']);
Route::post('users/{hash}/memberships', ['as' => 'sentinel.users.memberships', 'uses' => 'UserController@updateGroupMemberships']);
Route::put('users/{hash}', ['as' => 'sentinel.users.update', 'uses' => 'UserController@update']);
Route::delete('users/{hash}', ['as' => 'sentinel.users.destroy', 'uses' => 'UserController@destroy']);
Route::get('users/{hash}/suspend', ['as' => 'sentinel.users.suspend', 'uses' => 'UserController@suspend']);
Route::get('users/{hash}/unsuspend', ['as' => 'sentinel.users.unsuspend', 'uses' => 'UserController@unsuspend']);
Route::get('users/{hash}/ban', ['as' => 'sentinel.users.ban', 'uses' => 'UserController@ban']);
Route::get('users/{hash}/unban', ['as' => 'sentinel.users.unban', 'uses' => 'UserController@unban']);
// Sentinel Groups
Route::get('groups', ['as' => 'sentinel.groups.index', 'uses' => 'GroupController@index']);
Route::get('groups/create', ['as' => 'sentinel.groups.create', 'uses' => 'GroupController@create']);
Route::post('groups', ['as' => 'sentinel.groups.store', 'uses' => 'GroupController@store']);
Route::get('groups/{hash}', ['as' => 'sentinel.groups.show', 'uses' => 'GroupController@show']);
Route::get('groups/{hash}/edit', ['as' => 'sentinel.groups.edit', 'uses' => 'GroupController@edit']);
Route::put('groups/{hash}', ['as' => 'sentinel.groups.update', 'uses' => 'GroupController@update']);
Route::delete('groups/{hash}', ['as' => 'sentinel.groups.destroy', 'uses' => 'GroupController@destroy']);
});
示例14:
Route::post('register', ['as' => 'register_path', 'uses' => 'RegistrationController@store']);
/**
* Sessions
*/
Route::get('login', ['as' => 'login_path', 'uses' => 'SessionsController@create']);
/**
* Sessions
*/
Route::post('login', ['as' => 'login_path', 'uses' => 'SessionsController@store']);
/**
* Sessions
*/
Route::get('logout', ['as' => 'logout_path', 'uses' => 'SessionsController@destroy']);
/**
* Statuses
*/
Route::get('statuses', ['as' => 'statuses_path', 'uses' => 'StatusesController@index']);
Route::post('statuses', ['as' => 'statuses_path', 'uses' => 'StatusesController@store']);
Route::post('statuses/{id}/comments', ['as' => 'comment_path', 'uses' => 'CommentsController@store']);
/**
* Users
*/
Route::get('users', ['as' => 'users_path', 'uses' => 'UsersController@index']);
Route::get('@{username}', ['as' => 'profile_path', 'uses' => 'UsersController@show']);
/**
* Follows
*/
Route::post('follows', ['as' => 'follows_path', 'uses' => 'FollowsController@store']);
Route::delete('follows/{id}', ['as' => 'follow_path', 'uses' => 'FollowsController@destroy']);
// Reset password
Route::controller('password', 'RemindersController');
示例15: function
| and give it the controller to call when that URI is requested.
|
*/
// Home page
Route::get('/', function () {
if (Auth::check()) {
return redirect()->action('ReminderController@index');
} else {
return view('spark::welcome');
}
});
// Authenticated user routes
Route::group(['middleware' => 'auth'], function () {
// Redirect home to reminder
Route::get('home', function () {
return redirect()->action('ReminderController@index');
});
// Reminders Section
Route::group(['prefix' => 'reminder'], function () {
// Create
Route::get('create', 'ReminderController@create');
Route::post('create', 'ReminderController@store');
// List all
Route::get('/', 'ReminderController@index');
// Update
Route::get('edit/{id}', 'ReminderController@edit');
Route::patch('edit/{id}', 'ReminderController@update');
// Delete
Route::delete('delete/{id}', 'ReminderController@destroy');
});
});