I have run into a small problem. I have a site built that only has a web interface at the moment, but I want to expand and build a REST API for a mobile app. The problem is, my controllers return blade views, and not a JSON response. How would I go about writing the code for my API? It almost seems as if I will have to copy and paste code and then format it to return JSON, but that would create quite the headache for patching bugs. Any thoughts?
Asked
Viewed
89 times
0
-
possible duplicate of How to make an REST API first web application in Laravel – user2629998 Jul 17 '14 at 3:01
-
Evidently I was searching for the wrong keywords. I found what I needed. – Alex Justi Jul 17 '14 at 3:23