Vinai/magehack-voting — pull request #2 by amacgregor (2014-01-14 00:26:43+00:00)
Title: Refactor to make the routes cleaner 

I did some refactoring around the controllers, to make it cleaner and add some eager loading into the projects controller.

There are 3 controllers **VoteController, UserController** and **ProjectController**. For each I already implemented the index and show actions which allow you to retrieve full list or a specific record.

I modified the **ProjectController** to do eager loading on the user and vote models; this will allow to make a single call to get a project full information; instead of multiple ones.

I updated the doc samples, with "real" data so you have those as reference. The **post** method is also working for projects, so the form in the homepage works as it is and will return the created project object as json.

I will continue implementing the other actions next. Let me know if there is anything that needs to be tweaked.

Note for seeing the routes available run:

php artisan routes

![image](https://f.cloud.github.com/assets/212169/1906488/477dd2b4-7cb1-11e3-88b6-9091c2bf5a65.png)