methods
Recommended controller Method Name
Verb | URI | Method |
---|---|---|
GET | /project | index |
GET | /project/create | create |
POST | /project | store |
GET | /project/{project_id} | show |
GET | /project/{project_id}/edit | edit |
POST | /project/{project_id} | update |
POST | /project/{project_id}/delete | destroy |
WORKS ON AJAX ONLY AND SOME BROWSERS | ||
PUT/PATCH | /project/{project_id} | update |
DELETE | /project/{project_id} | destroy |
GET
, POST
, PUT
/PATCH
and DELETE
(there are others) are a part of the HTTP standard, but you are limited to GET
and POST
in HTML forms at this time. You can use PUT
/PATCH
and DELETE
in AJAX
requests; however, this only works in some browsers.
ALWAYS REMEMBER WHEN ADDING A CLASS, DON'T FORGET TO ADD IT'S NAMESPACE AND RE-INITIALIZE THE CLASS AUTOLOADER USING COMPOSER.
This is how you re-initialize class autoloader using composer.
Last updated