title: How to Delete Images from Public/Images Folder in laravel 5 (URL Data)
body: <p>how to delete images file from public/images folder in laravel 5 ??</p>
  
  <p>i found some example from this site, but i know they are just using the file name in their <code>record table</code>, but i'm using something like <code>URL</code> e.g <code>localhost/project/uploads/filename.jpg</code> on my <code>record table</code>. so if i tried like this :</p>
  
  <pre><code>    $image_path = $data-&gt;image;  // the value is : localhost/project/image/filename.format
      if(File::exists($image_path)) {
          File::delete($image_path);
      }
  </code></pre>
  
  <p>the file is not deleted</p>
  
  <p>help pls, thanks</p>