title: Why is detach not working on my Laravel model?
body: <p>Here is some of my code:</p>
  
  <pre><code>class User extends Model {
  
      public function orders() {
          return $this-&gt;hasMany('App\Order');
      }
  
      public function emptyCart() {
          $orders = $this-&gt;orders;
  
          for ($i = 0; $i &lt; count($orders); $i++) {
              $order = $orders[$i];
              $this-&gt;orders()-&gt;detach($order);
          }
      }
  }
  </code></pre>
  
  <p>Yet I am getting an error:</p>
  
  <p><code>Call to undefined method Jenssegers\Mongodb\Query\Builder::detach()</code></p>
  
  <p>I also tried <code>dissociate()</code>:</p>
  
  <p><code>Call to undefined method Jenssegers\Mongodb\Query\Builder::dissociate()</code></p>
  
  <p>Originally I was just going to do <code>$this-&gt;orders()-&gt;detach()</code> but this also failed.</p>