title: Laravel collection using map and contains
body: <p>I am having problem with <code>available</code> key in the <code>map</code> collection.</p>
  
  <p>The <code>available</code> key use <code>contains</code> method. It should return true if the value of product id in $unavailableProducts does not contain in $products <code>($value-&gt;product_id == $product-&gt;id)</code></p>
  
  <p>What did I do wrong?</p>
  
  <pre><code>    $unavailableProducts = $this-&gt;unavailableProducts();
      $products = $this-&gt;products-&gt;all();
  
      $allProducts = $products-&gt;map(function ($product) use($unavailableProducts) {
      return [
          'id'            =&gt; $product-&gt;id,
          'title'         =&gt; $product-&gt;title,
          'available'     =&gt; $unavailableProducts['result']-&gt;contains(function ($value, $key) use ($product) {
              if ($value-&gt;product_id == $product-&gt;id) {
                  return false;
              }
              return true;
          }),
      ];
  });
  </code></pre>