最終更新:2018-03-21 (水) 14:58:25 (2222d)
Laravel/ルーティング
https://laravel.com/docs/5.6/routing
記法
Route::get('hello/', callback());
Route::get('hello/{message}', function($message){});
Route::get('hello/', 'controller@medhod');
Laravel/プロジェクト/routes
- All Laravel routes are defined in your route files, which are located in the routes directory.
Laravel/プロジェクト/routes/web.php
- defines routes that are for your web interface.
- These routes are assigned the web middleware group, which provides features like session state and CSRF protection.
- セッション、CSRF対策、cookieの暗号化といった機能を提供する web ミドルウェアを経由
Laravel/プロジェクト/routes/api.php?
- stateless and are assigned the api middleware group.