title: Laravel 5.3: delete image from storage
body: <p>I have a method which deletes a product and image that belongs to it, but I can not delete the image.</p>
  
  <p>Where am I going wrong with this?</p>
  
  <pre><code>public function deleteProduct($ids)
  {
      foreach ($ids as $id =&gt; $value) {
          $product = Product::find($id);
          $productImage = $product-&gt;image_path;
          if ($productImage) {
              Storage::delete($productImage);
              $product-&gt;destroy($id);
          }
      }
  }
  </code></pre>
  
  <p>I have a symlink between storage and public folder. </p>
  
  <p>Under storage images are located at e.g. - storage/app/public/images/products/4/image.png</p>
  
  <p>Under public - public/storage/images/products/4/imagep.png</p>
  
  <p>Image path is stored in database as - /storage/images/products/4/ACTCMRcYlWR8Bn3ZxoJ7bpiDJ7.png</p>