title: Call to a member function addEagerConstraints() on a non-object
body: <p>I get this error msg Call to a member function addEagerConstraints() on a non-object when I am trying to call a function from my model.
  Here is the function:</p>
  
  <pre><code>public static function checkClaimById($claim_id) {
      $result = Claim::with('orders')
          -&gt;find($claim_id)
          -&gt;where('orders.user_id', Auth::user()-&gt;id)
          -&gt;whereNull('deleted_at')
          -&gt;count();
      if($result &gt;= 1) {
          return true;
      } else {
          return false;
      }
  }
  </code></pre>
  
  <p>I have the Model "claim" with has a field order_id and it belongs to an order.
  And I have the model "order" and one Order has many claims.</p>
  
  <p>Can someone help me?</p>
  
  <p>thanks
  Regards</p>