Routes

Notes: Routes should have a RESTFUL design. And their names should match the names of the corresponding controllers and models.

General Example

Model = Wish_List.php

Controller = WishListController.php

Routes:

GET /api/wish-lists => WishListController@list

GET /api/wish-lists/{list} => WishListController@get

POST /api/wish-lists => WishListController@create

PUT /api/wish-lists/{list} => WishListController@update

DELETE /api/wish-lists/{list} => WishListController@delete

Sublisting

Note: When listing items that belong to another major model do the following. For Example a Group has many Members

Model = Group.php

Model = Member.php

Listing Members By Group

GET /api/groups/{group}/members => MemberController@listByGroup