title: Laravel - Call to a member function get() on a non-object
body: <pre><code>@foreach ($wishItems as $wishItem)
      &lt;?php $products = Product::find($wishItem-&gt;product_id)-&gt;get(); ?&gt;
      @foreach($products as $product)
          @if($product-&gt;id == $wishItem-&gt;product_id)
              Name: &lt;a href="{{ URL::route('product', $product-&gt;id) }}"&gt; {{ $product-&gt;title }} &lt;/a&gt;&lt;br&gt;
              Price: {{ $product-&gt;price }} &amp;euro;&lt;br&gt;
              &lt;hr&gt;
          @endif
      @endforeach
  @endforeach
  </code></pre>
  
  <p><code>$wishItems</code> is var that is sent to this view and it is ok... <strong><code>$products = Product::find($wishItem-&gt;product_id)-&gt;get();</code></strong> here I have problem.. I got error: <strong><code>Call to a member function get() on a non-object</code></strong> .... I tried to replace <strong><code>$wishItem-&gt;product_id</code></strong> with number for example <strong><code>3</code></strong> [it exists in DB] but again same...</p>