title: How to get items are not in a collection in Laravel Eloquent?
body: <p>In my Laravel 6.x project I have <code>Product</code> model, <code>Warehouse</code> and <code>WarehouseProduct</code> models.</p>
  
  <p>In the Product I store the base information of my products. In the WarehouseProduct I store the stock amount informations about products in warehouse. Of course I have many warehouses with many products.</p>
  
  <p>My <code>Product</code> looks like this:</p>
  
  <pre class="lang-php prettyprint-override"><code>class Product extends Model
  {
      protected $fillable = [
          'name',
          'item_number',
          // ...
      ];
  }
  </code></pre>
  
  <p>The <code>Warehouse</code> looks like this:</p>
  
  <pre class="lang-php prettyprint-override"><code>class Warehouse extends Model
  {
      protected $fillable = [
          'name',
          'address',
          // ...
      ];
  
      public function products() {
          return $this-&gt;hasMany(WarehouseProduct::class);
      }
  
      public function missingProduct() {
          // here I need to return a Product collection which are not in this Warehouse or the
          // stored amount is 0
      }
  }
  </code></pre>
  
  <p>Finally the <code>WarehouseProduct</code> looks like this:</p>
  
  <pre class="lang-php prettyprint-override"><code>class WarehouseProduct extends Model
  {
      protected $fillable = [
          'product_id',
          'warehouse_id',
          'amount',
          // ...
      ];
  
      public function product() {
          return $this-&gt;belongsTo(Product::class, 'product_id');
      }
  
      public function warehouse() {
          return $this-&gt;belongsTo(Warehouse::class, 'warehouse_id');
      }
  </code></pre>
  
  <p>How can I get a <code>Product</code> collection which are not stored in a <code>Warehouse</code> or the amount is <code>0</code>?</p>