Having a resource controller, there are the default representations of the used models as a website (HTML served by access via browser). But I would also like to manage the resources behind the controller over a REST API without repeating code just to serve JSON instead of HTML.
How would you solve this? My ideas so far:
if
s in the controller actions).Access to REST API should be restricted by OAuth. Would it still be reasonable to cram content delivery and REST API into the same controller?
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community