title: Laravel 5.5 - API ID not found 404 instead of JSON
body: <p>I am using findOrFail on a Laravel 5.5 API route like this...</p>
  
  <pre><code>public function getCategory(Request $request, $id) {
  
      /* Get Category From ID */
      try {
          $category = Category::with('users')-&gt;findOrFail($id);
      }
  
      /* catch(Exception $e) catch any exception */
      catch(ModelNotFoundException $e) {
  
          /* Return Success Response */
          return Response::json(array(
              'error' =&gt; true,
              'status_code' =&gt; 400,
              'response' =&gt; 'category_id_not_found',
          ));
  
      }
  }
  </code></pre>
  
  <p>If I put in an ID that does not exists then I get a 404 error instead of the JSON response.</p>
  
  <p>Where am I going wrong?</p>
  
  <h2>Update</h2>
  
  <p>Turns out I wasn't including</p>
  
  <pre><code>use Illuminate\Database\Eloquent\ModelNotFoundException;
  </code></pre>
  
  <p>in the controller, thanks to Sohel0415 for making me look in that direction.</p>