title: Upload images and showing them in a view Laravel 5.2
body: <p>I made a function in which I upload images of some products. When I iterate through all my products, I want to show the image too. </p>
  
  <p>The problem is, the image is being uploaded, but I can't present it when i iterate with <code>@foreach</code>. I tried in the controller to get the path but it didn't work.</p>
  
  <p>So far I have done this:</p>
  
  <p>In config/filesystems.php I created a custom storage</p>
  
  <pre><code>'products' =&gt; [
          'driver' =&gt; 'local',
          'root'   =&gt; public_path('/pictures/uploads/products'),
      ],
  </code></pre>
  
  <p>When I create a new product:</p>
  
  <pre><code>&lt;h1&gt;Create new product&lt;/h1&gt;
    {!! Form::open(['route' =&gt; 'vendor.allproducts', 'files'=&gt;true]) !!}
    &lt;div class="form-group"&gt;
       {!! Form::label('Title', 'Title:') !!}
       {!! Form::text('title',null,['class'=&gt;'form-control']) !!}
    &lt;/div&gt;
    &lt;div class="form-group"&gt;
       {!! Form::label('File', 'File:') !!}
       {!! Form::file('image') !!}
    &lt;/div&gt;
  </code></pre>
  
  <p>When i iterate through my products info:</p>
  
  <pre><code>@foreach ($products as $product)
      &lt;tr&gt; 
        .
        .
  
         &lt;td&gt;&lt;img src="{{ $product-&gt;imagePath }}"&gt;&lt;/td&gt;
       &lt;/tr&gt;
   @endforeach
  </code></pre>
  
  <p>And in Controller:</p>
  
  <pre><code>public function store(){
      $product = Request::all();
      $file = Request::file('image');
      $extension = $file-&gt;getClientOriginalExtension();
      Storage::disk('products')-&gt;put($file-&gt;getFilename().'.'.$extension,  File::get($file));
      //$product-&gt;imagePath = Input::file('image')-&gt;getRealPath();
      Auth::user()-&gt;products()-&gt;create($product);
      return redirect()-&gt;route('allproducts');
  }
  </code></pre>