There are seven restful resource controllers in Laravel.
The following table shows the actions handled by the restful resource controllers in a Laravel application.
Verb |
Path |
Action |
Route Name |
Use |
GET |
/users |
index |
users.index |
get all users |
GET |
/users/create |
create |
users.create |
create a new user |
POST |
/users |
store |
users.store |
store user details |
GET |
/users/{user} |
show |
users.show |
get user details |
GET |
/users/{user}/edit |
edit |
users.edit |
edit user |
PUT/PATCH |
/users/{user} |
update |
users.update |
update user |
DELETE |
/users/{user} |
destroy |
users.destroy |
delete user |