After creating the resource controller PhotosControllerfor the website, which also calls AJAX calls in the API, it looks like the resource controller can be used both on a regular website and as an API.
HTML page is displayed for Photowith id = 1
http:
and javascript uses the following which updates the resource Photoand returns a JSON response
PUT http://domain.com/api/v1/photos/1
Question: Will we have 2 PhotoControllers, one for processing APIs and one for non-APIs?
source
share