本文整理汇总了PHP中Route::Post方法的典型用法代码示例。如果您正苦于以下问题:PHP Route::Post方法的具体用法?PHP Route::Post怎么用?PHP Route::Post使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Route
的用法示例。
在下文中一共展示了Route::Post方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: function
|
| Here is where you can register all of the routes for an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the Closure to execute when that URI is requested.
|
*/
Route::get('/', function () {
// return View::make('hello');
return View::make('front_end/login');
});
//Route::get('post/single', function()
//{
// return View::make('post/single');
//});
Route::post('login/submit', array('uses' => 'LoginController@authenticate', 'as' => 'login/submit'));
//Route::get('post/single','PostController@single');
Route::get('post/single', array('uses' => 'PostController@single', 'as' => 'post/singl', 'before' => 'auth'));
//Route::get('post/listing', array('uses' => 'PostController@listing', 'as' => 'post/listing'));
Route::get('post/{id}/{name}', array('uses' => 'PostController@single', 'as' => 'post/singl'))->where('id', '[0-9]+');
Route::get('template', ['as' => 'home', function () {
return View::make('template/header');
}]);
Route::get('login', function () {
return View::make('front_end/login');
});
Route::group(array('before' => 'auth'), function () {
Route::Post('passwordSubmit', array('uses' => 'LoginController@changePasswordSubmit', 'as' => 'passwordSubmit'));
Route::get('front_end/changePassword', array('uses' => 'LoginController@changePassword', 'as' => 'front_end/changePassword'));
Route::get('front_end/logout', array('uses' => 'LoginController@logout', 'as' => 'front_end/logout'));
Route::get('front_end/home', array('uses' => 'CompanyType@showAll', 'as' => 'front_end/home'));
});
示例2:
<?php
/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the controller to call when that URI is requested.
|
*/
Route::get('auth/login', 'Auth\\AuthController@getLogin');
Route::post('auth/login', 'Auth\\AuthController@postLogin');
Route::get('auth/logout', 'Auth\\AuthController@getLogout');
Route::get('/', 'ConcertController@index');
// index
Route::post('/{page}', 'ConcertController@getPage');
//pagination
Route::post('/', 'ConcertController@filter');
// filtering
Route::get('/concert/{concert}', 'ConcertController@concert');
// concert page
Route::get('admin', 'Admin@index');
// index
Route::Post('admin/delete/{concert}', 'Admin@destroy');
Route::get('admin/edit/{concert}', 'Admin@edit');
// http://dev-node/laravel/codepi_tt/resources/assets/images/logo_codepi.png
//http://dev-node/laravel/codepi_tt/public/resources/assets/images/logo_codepi.png
示例3: array
Route::post('/ajax/registration', array('as' => 'ajaxRegistration', 'uses' => 'AjaxController@post_registration', 'before' => 'csrf'));
Route::post('/ajax/associate/registration', array('as' => 'ajaxAssociateRegistration', 'uses' => 'AjaxController@post_associateRegistration', 'before' => 'csrf'));
Route::post('/ajax/login', array('as' => 'ajaxLogin', 'uses' => 'AjaxController@post_login'));
Route::post('/ajax/logout', array('as' => 'ajaxLogout', 'uses' => 'AjaxController@post_logout', 'before' => 'auth'));
Route::post('/ajax/vaedit', array('as' => 'ajaxVAEdit', 'uses' => 'AjaxController@post_vaedit', 'before' => 'auth|csrf'));
Route::post('/ajax/newticket', array('as' => 'ajaxNewTicket', 'uses' => 'AjaxController@post_newticket', 'before' => 'auth|csrf'));
Route::post('/ajax/closeticket', array('as' => 'ajaxCloseTicket', 'uses' => 'AjaxController@post_closeticket', 'before' => 'auth'));
Route::post('/ajax/reopenticket', array('as' => 'ajaxReopenTicket', 'uses' => 'AjaxController@post_reopenticket', 'before' => 'auth'));
Route::post('/ajax/replyticket', array('as' => 'ajaxReplyTicket', 'uses' => 'AjaxController@post_replyticket', 'before' => 'auth|csrf'));
Route::post('/ajax/deletebanner', array('as' => 'ajaxDeleteBanner', 'uses' => 'AjaxController@post_deletebanner', 'before' => 'auth|csrf'));
Route::post('/ajax/checkimagelinkback', array('as' => 'ajaxCheckImageLinkBack', 'uses' => 'AjaxController@post_checkimagelinkback'));
Route::post('/ajax/getvasbycategory', array('as' => 'ajaxGetVasByCategory', 'uses' => 'AjaxController@post_getvasbycategory'));
Route::post('/ajax/searchvas', array('as' => 'ajaxSearchVAs', 'uses' => 'AjaxController@post_searchvas'));
Route::post('/ajax/newguestticket', array('as' => 'ajaxnewguestticket', 'uses' => 'AjaxController@post_newguestticket', 'before' => 'csrf'));
Route::post('/ajax/guestfindticket', array('as' => 'ajaxguestfindticket', 'uses' => 'AjaxController@post_guestfindticket', 'before' => 'csrf'));
Route::Post('/ajax/guest/submitticket', array('as' => 'ajaxguestsubmitreply', 'uses' => 'AjaxController@post_guestsubmitticket', 'before' => 'csrf'));
Route::post('/ajax/guest/closeticket', array('as' => 'ajaxguestcloseticket', 'uses' => 'AjaxController@post_guestcloseticket', 'before' => 'csrf'));
Route::post('/ajax/guest/reopenticket', array('as' => 'ajaxguestreopenticket', 'uses' => 'AjaxController@post_guestreopenticket', 'before' => 'csrf'));
Route::post('/ajax/forgotpass', array('as' => 'ajaxforgotpass', 'uses' => 'AjaxController@post_forgotpass', 'before' => 'csrf'));
//Pages
//GET
Route::get('/va', array('as' => 'va', 'uses' => 'VaController@get_va', 'before' => 'auth'));
Route::get('/click/{id}', array('as' => 'click', 'uses' => 'ClickController@get_click'));
Route::get('maintenance', array('as' => 'maintenance', 'uses' => 'IndexController@get_maintenance'));
//POST
Route::post('/va/uploadbanner', array('as' => 'uploadbanner', 'uses' => 'VaController@post_uploadbanner', 'before' => 'auth|csrf'));
//-----------------------------------------------------------------
//-
//--
//-----
//----------
示例4:
Route::post('modpack-alias/add', ['as' => 'modpack_alias_add', 'uses' => 'ModpackAliasController@postAdd']);
Route::get('modpack/{version}/{slug}/aliases', ['as' => 'modpack_alias_add', 'uses' => 'ModpackAliasController@getAliases']);
//Modpack Tags
Route::get('tag/modpack/add', ['as' => 'modpack_tag', 'uses' => 'ModpackTagController@getAdd']);
Route::post('tag/modpack/add', ['as' => 'modpack_tag', 'uses' => 'ModpackTagController@postAdd']);
Route::get('tag/modpack/edit/{id}', ['as' => 'modpack_tag', 'uses' => 'ModpackTagController@getEdit']);
Route::post('tag/modpack/edit/{id}', ['as' => 'modpack_tag', 'uses' => 'ModpackTagController@postEdit']);
//Server Tags
Route::get('tags/server', ['as' => 'server_tag', 'uses' => 'ServerTagController@getTags']);
Route::get('tag/server/add', ['as' => 'server_tag', 'uses' => 'ServerTagController@getAdd']);
Route::post('tag/server/add', ['as' => 'server_tag', 'uses' => 'ServerTagController@postAdd']);
Route::get('tag/server/edit/{id}', ['as' => 'server_tag', 'uses' => 'ServerTagController@getEdit']);
Route::post('tag/server/edit/{id}', ['as' => 'server_tag', 'uses' => 'ServerTagController@postEdit']);
//Users
Route::get('user/permissions/{id}', ['as' => 'permissions_edit', 'uses' => 'UserController@getUserPermissions']);
Route::Post('user/permissions/{id}', ['as' => 'permissions_edit', 'uses' => 'UserController@postUserPermissions']);
//Youtube
Route::get('youtube/add', ['as' => 'youtube_add', 'uses' => 'YoutubeController@getadd']);
Route::post('youtube/add', ['as' => 'youtube_add', 'uses' => 'YoutubeController@postAdd']);
//Imports
Route::get('mod/import', ['as' => 'mod_import', 'uses' => 'ImportController@getStartImport']);
Route::post('mod/import', ['as' => 'mod_import', 'uses' => 'ImportController@postStartImport']);
Route::get('mod/import/{id}', ['as' => 'mod_import', 'uses' => 'ImportController@getImportMod']);
Route::post('mod/import/{id}', ['as' => 'mod_import', 'uses' => 'ImportController@postImportMod']);
Route::get('mod/import/{id}/author/{author_id?}', ['as' => 'mod_import', 'uses' => 'ImportController@getImportAuthor']);
Route::post('mod/import/{id}/author/{author_id}', ['as' => 'mod_import', 'uses' => 'ImportController@postImportAuthor']);
//Cache
Route::get('/cache/clear/{tag?}', ['as' => 'cache_clear', 'uses' => 'AdminController@getClearCache']);
//Misc
Route::get('memcache/stats', 'AdminController@getMemcacheStats');
/*
示例5: array
* User Inbox
*/
Route::get('/user/inbox', array('as' => 'user-inbox', 'uses' => 'UserClassController@getInbox'));
/*
* User Inbox
*/
Route::get('/user/inbox', array('as' => 'user-inbox', 'uses' => 'UserClassController@getInbox'));
/*
* User Assignments
*/
Route::get('/user/assignments', array('as' => 'user-assignments', 'uses' => 'UserClassController@getAssignments'));
/*
* School Events
*/
Route::get('/user/events', array('as' => 'user-events', 'uses' => 'UserClassController@getEvents'));
/**
* Ajax Api's
*/
/**
* APi for Attendance
*/
Route::Post('/user/attendance/new/application/leave', array('as' => 'user-attendance-new-attendance-leave', 'uses' => 'UserClassController@postNewLeaveApplication'));
/*
* Api to get All the Classes to a Stream (post)
*/
Route::Post('/user/classes/from/stream/id', array('as' => 'user-get-classes-from-stream-id', 'uses' => 'UserClassController@postGetClassesFromStreamId'));
/*
* Api to get section by Class (post)
*/
Route::Post('user/get/sections/from/class/id', array('as' => 'user-get-sections-from-class-id', 'uses' => 'UserClassController@postGetSections'));
});
示例6: array
* SignOUt (get)
*/
Route::get('/sign/out', array('as' => 'teacher-sign-out', 'uses' => 'TeacherLoginController@getSignOut'));
/*
* User Welcome Settings (get)
*/
Route::get('/welcome/settings', array('as' => 'teacher-welcome-settings', 'uses' => 'TeacherLoginController@getWelcomeSettings'));
/*
* Admin Home (get)
*/
Route::get('/home', array('as' => 'teacher-home', 'uses' => 'TeacherLoginController@getTeacherHome'));
/*
* Admin Profile (get)
*/
Route::get('/profile', array('as' => 'teacher-profile', 'uses' => 'TeacherAccountController@getTeacherProfile'));
/*
* Teacher Attendance (get)
*/
Route::get('/teacher/attendance', array('as' => 'teacher-attendance', 'uses' => 'TeacherController@getAttendance'));
/*
* School All settings (get)
*/
/*
* Set Initial School Session
*/
Route::get('/school/set/sessions', array('as' => 'teacher-school-set-sessions', 'uses' => 'TeacherLoginController@getSchoolSessions'));
/*
* Set Initial School Session (post)
*/
Route::Post('/school/set/sessions/post', array('as' => 'teacher-school-set-sessions-post', 'uses' => 'TeacherLoginController@postSetSchoolSessions'));
});
示例7: function
<?php
Route::group(['before' => 'guest'], function () {
/*
* Thankyou page after registering (get)
*/
Route::get('/account/thankyou/for/registering', array('as' => 'account-thankyou-for-registering', 'uses' => 'ErrorsAndThankYouController@getThankYouForRegistering'));
/*
* User Forgot password (get)
*/
Route::get('/account/email', array('as' => 'account-email', 'uses' => 'ErrorsAndThankYouController@getEmail'));
/*
* Validate Admin By school code and teacher code
*/
Route::Post('/school/validation', array('as' => 'mobile-user-school-validation-post', 'uses' => 'SchoolController@postValidateSchool'));
});
示例8: array
|
| Here is where you can register all of the routes for an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the Closure to execute when that URI is requested.
|
*/
//Route::get('/', function()
//{
// return View::make('hello');
//});
Route::get('/', array("as" => "home", "uses" => 'HomeController@index'));
Route::post('/', array("as" => 'homepost', "uses" => "HomeController@postIndex"));
Route::get('pages/home', 'HomeController@index');
Route::get('pages/{permalink}', array('as' => 'pages', 'uses' => 'HomeController@getPages'));
Route::get('posts/{permalink}', array('as' => 'pages', 'uses' => 'HomeController@getPages'));
Route::Post('pages/{permalink}', array('as' => 'pages', 'uses' => 'HomeController@postPages'));
Route::get("pages/contactus", array("as" => "cont", "uses" => "HomeController@getContact"));
Route::get("product/details/{path}", array("as" => "proddetail", "uses" => "HomeController@getProduct"));
Route::post("product/details/{path}", array("as" => "postproddetail", "uses" => "HomeController@postProduct"));
Route::get("product/category/{path}", array("as" => "catalogue", "uses" => "HomeController@getCatalogue"));
Route::post("product/category/{path}", array("as" => "postcatalogue", "uses" => "HomeController@postCatalogue"));
Route::get("product/brands/{path}", array("as" => "brand", "uses" => "HomeController@getBrand"));
Route::post("product/brands/{path?}", array("as" => "postbrands", "uses" => "HomeController@postCatalogue"));
Route::get("/catalog/{search?}", array("as" => "search", "uses" => "HomeController@getSearch"));
Route::post("/catalog/{search?}", array("as" => "postsearch", "uses" => "HomeController@postCatalogue"));
Route::get("register", array("as" => "register", "uses" => "HomeController@getRegister"));
Route::get("cart", array("as" => "cart", "uses" => "HomeController@getCart"));
Route::post("cart", array("as" => "postcart", "uses" => "HomeController@postCart"));
Route::get("checkout", array("as" => "checkout", "uses" => "HomeController@getCheckout"));
Route::post("checkout", array("as" => "postcheckout", "uses" => "HomeController@postCheckout"));
Route::get("success", array("as" => "success", "uses" => "HomeController@getSuccess"));
示例9: function
| and give it the controller to call when that URI is requested.
|
*/
// Authentication routes...
Route::get('auth/login', 'Auth\\AuthController@getLogin');
Route::post('auth/login', 'Auth\\AuthController@postLogin');
Route::get('auth/logout', 'Auth\\AuthController@getLogout');
// Registration routes...
Route::get('auth/register', 'Auth\\AuthController@getRegister');
Route::post('auth/register', 'Auth\\AuthController@postRegister');
// Password reset link request routes...
Route::get('auth/password', function () {
return view('/auth/password');
});
Route::get('password/email', 'Auth\\PasswordController@getEmail');
Route::post('password/email', 'Auth\\PasswordController@postEmail');
// Password reset routes...
Route::get('password/reset/{token}', 'Auth\\PasswordController@getReset');
Route::post('password/reset', 'Auth\\PasswordController@postReset');
Route::group(['middleware' => 'auth'], function () {
Route::get('/', function () {
return redirect('/home');
});
Route::get('/home', 'DashboardController@index');
Route::get('/tasks', 'TasksController@index');
Route::get('/tasks/remove/{id}', 'TasksController@destroy');
Route::post('/tasks', 'TasksController@store');
Route::get('/profile/', 'UserController@show');
Route::Post('/profile/', 'UserController@store');
Route::get('/alerts/', 'AlertController@index');
});
示例10: array
/**
* Check if Current Session is set
*/
Route::Post('/check/current/session/is/set', array('as' => 'admin-check-current-session-set', 'uses' => 'Admin\\AdminSchoolSettingsController@checkIfCurrentSessionSet'));
/**
* Get All School Teachers (get)
*/
Route::get('/school/teachers', array('as' => 'admin-school-teachers', 'uses' => 'Admin\\AdminTeacherSettingsController@getSchoolTeachers'));
/**
* Get All the Teachers (Post)
*/
Route::Post('/get/all/teachers', array('as' => 'admin-all-teachers', 'uses' => 'Admin\\AdminTeacherSettingsController@postGetAllTheTeachersRegisteredToSchool'));
//-------------------------------------school students -------------------------------------------------
/**
* Get All School Students (get)
*/
Route::get('/school/students', array('as' => 'admin-school-students', 'uses' => 'Admin\\AdminStudentSettingsController@getSchoolStudents'));
/**
* Get All the Students (Post)
*/
Route::Post('/get/all/students', array('as' => 'admin-all-students', 'uses' => 'Admin\\AdminStudentSettingsController@postGetAllTheStudentsRegisteredToSchool'));
//------------------------------------------------------school timetable-----------------------------------
/**
* Get School Time Table (get)
*/
Route::get('/school/time/table', array('as' => 'admin-school-time-table', 'uses' => 'Admin\\AdminTimeTableController@getTimeTable'));
/**
* Get Admin Profile (get)
*/
Route::get('/profile', array('as' => 'admin-profile', 'uses' => 'Admin\\AdminAccountController@getProfile'));
});
示例11: array
/*
* User SignIn Account (get)
*/
Route::get('/account/sign/in', array('as' => 'account-user-sign-in', 'uses' => 'LoginAndRegisterController@getSignIn'));
/*
* User SignIn Account (Post)
*/
Route::Post('/account/sign/in', array('as' => 'account-user-sign-in-post', 'uses' => 'LoginAndRegisterController@postSignIn'));
/*
* User Forgot password (get)
*/
Route::get('/account/retrieve/password', array('as' => 'account-user-retrieve-password', 'uses' => 'LoginAndRegisterController@getRetrievePassword'));
/*
* User Forgot password (get)
*/
Route::Post('/account/retrieve/password/post', array('as' => 'account-user-retrieve-password-post', 'uses' => 'LoginAndRegisterController@postRetrievePassword'));
/*
* User Activate Account (get)
*/
Route::get('/account/{userId}/activate/{code}', array('as' => 'account-user-activate', 'uses' => 'LoginAndRegisterController@getActivate'));
/*
* User Recover Account (get)
*/
Route::get('/account/{userId}/recover/{code}', array('as' => 'account-user-recover', 'uses' => 'LoginAndRegisterController@getRecover'));
/*
* User Recover Account (get)
*/
Route::post('/account/recover', array('as' => 'account-user-recover-post', 'uses' => 'LoginAndRegisterController@postRecover'));
/*
* User Log Out (get)
*/
示例12: function
Route::get('auth/register', 'Auth\\AuthController@getRegister');
Route::post('auth/register', 'Auth\\AuthController@postRegister');
Route::get('home', 'HomeController@index');
Route::get('contact', 'ContactController@index');
Route::get('recherche', 'RechercheController@index');
Route::post('recherche', 'RechercheController@search');
Route::get('admin', 'Admin\\AdminController@index');
// Test
Route::get('test', 'TestController@index');
// Medicament routes
Route::get('medicaments/fiche/{id}', 'Medicaments\\MedicamentsController@show');
Route::get('medicaments/add', 'Medicaments\\MedicamentsController@create');
Route::get('medicaments/update/{id}', 'Medicaments\\MedicamentsController@ShowUpdate');
Route::post('medicaments/update/{id}', 'Medicaments\\MedicamentsController@update');
Route::post('medicaments/new', 'Medicaments\\MedicamentsController@news');
//Route::delete('medicaments/{id}', 'Medicaments\MedicamentsController@destroy');
Route::group(['prefix' => 'api'], function () {
Route::post('login', 'Api\\AuthController@login');
Route::post('register', 'Api\\AuthController@register');
Route::post('search', 'Api\\SearchController@search');
Route::get('home', 'Api\\HomeController@index');
Route::get('fiche/{id}', 'Api\\MedicamentController@fiche');
Route::get('admin/{user_email}', 'Api\\MedicamentController@show');
Route::Post('add', 'Api\\MedicamentController@add');
Route::group(['middleware' => ['jwt.auth', 'jwt.refresh']], function () {
Route::post('logout', 'Api\\AuthController@logout');
Route::get('test', function () {
return response()->json(['foo' => 'bar']);
});
});
});
示例13:
Route::get('update_department={id}', "Administrator@get_update_department");
Route::post('update_department={id}', "Administrator@post_update_department");
/////////////////////////////////////////////////
//Courses
Route::get('add_course', "Administrator@get_add_course");
Route::Post('add_course', "Administrator@post_add_course");
Route::get('view_courses', "Administrator@get_view_course");
Route::get('delete_course={id}', "Administrator@delete_course");
Route::get('update_course={id}', "Administrator@get_update_course");
Route::post('update_course={id}', "Administrator@post_update_course");
//////////////////////////// Student //////////////////////////////////////
//Student
Route::get('add_id', "Administrator@get_student_id");
Route::post('Add_ID', "Administrator@post_student_id");
Route::get('add_student', "Administrator@get_add_student");
Route::Post('add_student', "Administrator@post_add_student");
Route::get('view_student', "Administrator@view_student");
Route::get('delete_student={id}', "Administrator@delete_student");
Route::get('edit_student={id}', "Administrator@get_update_student");
Route::post('edit_student={id}', "Administrator@post_update_student");
/////////////////////////////////////////////////
//Teacher
Route::get('add_teacher', "Administrator@get_add_teacher");
Route::post('add_teacher', "Administrator@post_add_teacher");
Route::get('view_teacher', "Administrator@get_view_teacher");
Route::get('delete_teacher={id}', "Administrator@delete_teacher");
Route::get('edit_teacher={id}', "Administrator@get_update_teacher");
Route::post('edit_teacher={id}', "Administrator@post_update_teacher");
/////////////////////////////////////////////////
//Professor
Route::get('add_prof', "Administrator@get_add_professor");
示例14: array
Route::get('/profile/details', array('as' => 'user-profile-details', 'uses' => 'User\\UserAccountController@getProfileDetails'));
/**
* Get User Details (post)
*/
Route::Post('/get/details', array('as' => 'user-get-details', 'uses' => 'User\\UserAccountController@postGetDetails'));
/**
* Update User Details (post)
*/
Route::Post('/update/details', array('as' => 'user-update-details', 'uses' => 'User\\UserAccountController@postUpdateDetails'));
/**
* Update User Email (post)
*/
Route::Post('/update/email', array('as' => 'user-update-email', 'uses' => 'User\\UserAccountController@postChangeEmailAddress'));
/**
* Update User Password (post)
*/
Route::Post('/update/password', array('as' => 'user-update-password', 'uses' => 'User\\UserAccountController@postChangePassword'));
/********************************** User Profile ****************************************/
/**
* Get User Profile (get)
*/
Route::get('/profile', array('as' => 'user-profile', 'uses' => 'User\\UserAccountController@getProfile'));
/**
* Update User Profile pic (post)
*/
Route::Post('/update/profile/pic', array('as' => 'user-update-profile-pic', 'uses' => 'User\\UserAccountController@postUpdateProfilePic'));
/**
* Update User Cover pic (post)
*/
Route::Post('/update/cover/pic', array('as' => 'user-update-cover-pic', 'uses' => 'User\\UserAccountController@postUpdateCoverPic'));
});
示例15:
<?php
/******************************************************************************************************************************
*
* AUTHOR : Jan Klemmensen
* CREATED : 1/8/2014
*
* PURPOSE : This is where you define your routes - At the moment GET and POST can be used
* Adding wildcards : Route::Get( '/users/:id', 'IndexController', 'getIndex' );
* Getting wildcards : echo Route::Request('id'); ******************************************************************************************************************************
*/
# Index page
Route::Get('/', 'IndexController', 'getIndex');
Route::Post('/', 'IndexController', 'postIndex');