title: Laravel: Where to throw HTTP Exceptions
body: <h3>Background</h3>
  
  <p>Within PHP / Laravel MVC applications response codes and bodies are often dictated by the Exception that is thrown. If a HTTP exception is thrown (inheriting from <code>Symfony\Component\HttpKernel\Exception\HttpException</code>) the correct response codes are thrown (and in certain cases JSON responses). There are other types of exceptions that are non-http related as well that can be thrown.</p>
  
  <h3>Question</h3>
  
  <p>Where should HTTP exceptions be thrown? </p>
  
  <ul>
  <li><strong>A</strong> Only the controller</li>
  <li><strong>B</strong> Anywhere. Deep or shallow in  the applications stack.</li>
  </ul>
  
  <p>Should I be catching my exceptions in the controller and throwing HTTP versions of those exceptions? Or should I just throw a HTTP exception anywhere deep within a service class, repository or utility considering 99% of MVC framework apps are based around a HTTP request >> response lifecycle anyway?</p>