andrew13/Laravel-4-Bootstrap-Starter-Site — pull request #131 by nekwebdev (2013-06-23 03:28:05+00:00)
Title: Resource Admin Controllers, work towards fully ajax forms.

So far changes only concern AdminUsersController and AdminPostsController (renamed it from blogs, since all these controllers are being made resourceful and using repositories I'd rather the naming convention matched ^^).

It turns out I can not use PresentableInterfaces on the Post model with the Form::model() method, something about the PostPrentable object not being able to be an array.

Anyways I feel that with auto loaded repositories everything that was in the presenters could go there, what do you think? It would be one less package and using more of Laravel 4 built in IoC.

Please let me know what you think.

Next step would be to make Roles and Comments controllers resources and have their views match the new format I put together, which is also up for discussion of course. Once that is done I think this would be ready for a merge.

After that I plan to tackle all the admin side forms to be inside Bootstrap modals and using Ajax to prevent page refreshes and make it smoother.

A basic step towards this is my implementation of the delete function for users and posts so far.

This was nice because it helped keep the controller even closer to a very basic resource/api as it no longer needs to generate a delete form!

Verb	Path	Action	Route Name
GET	/resource	index	resource.index
GET	/resource/create	create	resource.create
POST	/resource	store	resource.store
GET	/resource/{id}	show	resource.show
GET	/resource/{id}/edit	edit	resource.edit
PUT/PATCH	/resource/{id}	update	resource.update
DELETE	/resource/{id}	destroy	resource.destroy

and

GET /resource/data data resource.data

All RESTful actions are handled in an API manner, with an additional named route for datatables.

Next step would be making it submit the delete form via Ajax.

Opinions ;)