Flysystem file not found when uninstalling

I am trying to delete a photo from Laravel 5.

Storage::delete( asset('/uploads/slides/abcd.jpg')); 

It returns this error:

 FileNotFoundException in Filesystem.php line 428: File not found at path: http:/localhost:8000/uploads/slides/abcd.jpg 

If I copy and paste the path in the browser, it will open the file so that the file really exists. What's wrong?

+5
source share
1 answer

I have found a solution.

I had to change the root path in config / filesystem.php because it was viewing the file in the old specific path (storage path)

This is a modified version.

 'disks' => [ 'local' => [ 'driver' => 'local', 'root' => public_path(), ], ] 
+6
source

All Articles