RESTful Resource controller A RESTful resource controller sets up some default routes for you and even names them. Route::resource('users', 'UsersController'); Gives you these named routes: Verb Path Action Route Name GET /users index users.index GET…
stackoverflow找到的问题:http://stackoverflow.com/questions/23505875/laravel-routeresource-vs-routecontroller Route::resource('users', 'UsersController'); Verb Path Action Route Name GET /users index users.index GET /users/create create users.create POST /…
格式: Route::resource('/order', 'OrderController', ['as' => 'admin']); 框架自动创建路由及其对应控制器中的方法: 请求方式 路由 action description GET /order index 索引/列表 GET /order/create create 创建表单页展示 POST /order store 保存创建的数据 GET /order/{id}/edit edit 展示编辑页面 PUT/PATHCH /order/…
原文地址:http://cheats.jesse-obrien.ca/ Artisan // Displays help for a given command php artisan --help OR -h // Do not output any message php artisan --quiet OR -q // Display this application version php artisan --version OR -V // Do not ask any interac…
Basic Controllers Instead of defining all of your route-level logic in a single routes.php file, you may wish to organize this behavior using Controller classes. Controllers can group related route logic into a class, as well as take advantage of mor…