# 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.**

<mark style="color:red;">**ALWAYS REMEMBER WHEN ADDING A CLASS, DON'T FORGET TO ADD IT'S NAMESPACE AND RE-INITIALIZE THE CLASS AUTOLOADER USING COMPOSER.**</mark>

This is how you re-initialize class autoloader using composer.

```bash
composer dump-autoload
```
