Verb | URI | Action | Route Name |
---|---|---|---|
GET | /photos | index | photos.index |
GET | /photos/create | create | photos.create |
POST | /photos | store | photos.store |
GET | /photos/{photo} | show | photos.show |
GET | /photos/{photo}/edit | edit | photos.edit |
PUT/PATCH | /photos/{photo} | edit | photos.edit |
DELETE | /photos/{photo} | destroy | photos.destroy |
Php artisan make:controller HomeController
Php artisan make:controller —help
웹 접근용 라우트는 일반 사용자가 방문하는 URL
Routes/web.php
URL에서 같은 prefix(접두사)를 붙이는 대신 라우트 그룹 기능으로 postlist를 생략
Auth 미들웨어로 로그인한 사용자만 접근할 수 있게 한다.