Skip to content

Overhauling Controller #63

@jasonlewis

Description

@jasonlewis

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions