title: How do you force a JSON response on every response in Laravel?
body: <p>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:</p>
  
  <pre><code>return Response::json($data);
  </code></pre>
  
  <p>In other words I want every response to be JSON. Is there a good way to do that?</p>
  
  <blockquote>
    <p><strong>Update:</strong> The response must be JSON even on exceptions like not found
    exception.</p>
  </blockquote>