Okay the plan is to overhaul the controller that the API ships with to provide a bunch of helper methods to easily return better responses.
Currently responses are kind of "magically" transformed. I'd like to keep that, but perhaps add a configuration option to disable it (perhaps by default?) so that you can return raw responses (in regards to #50) and also make use of the helper methods.
Possible helper methods:
withPaginator
withCollection
withModel
withArray
Usage would be:
return $this->withModel(User::find(1));
Or something to that affect. Just after some thoughts and other possible methods.
/cc @philsturgeon
Okay the plan is to overhaul the controller that the API ships with to provide a bunch of helper methods to easily return better responses.
Currently responses are kind of "magically" transformed. I'd like to keep that, but perhaps add a configuration option to disable it (perhaps by default?) so that you can return raw responses (in regards to #50) and also make use of the helper methods.
Possible helper methods:
withPaginatorwithCollectionwithModelwithArrayUsage would be:
Or something to that affect. Just after some thoughts and other possible methods.
/cc @philsturgeon