I'm trying to build a REST api using Laravel Framework, I want a way to force the API to always responed with JSON not by doing this manulaly like:
return Response::json($data);In other words I want every response to be JSON. Is there a good way to do that?
Update: The response must be JSON even on exceptions like not found exception.