lundi 7 mai 2018

Deleting file with Laravel

i'm having troble deleting a file from a Laravel Project. The file is in the /storage/exports directory, it's an excel stored on the disk usingthe Laravel Excel library. This is my code:

$path = $excel->store('xls', false, true)['full'];
...send the xls via mail....
Storage::delete($path);

When i check the existence of the file with file_exist i get true, so Laravel is able to read the file. I've also checked the permission for the folder and i give all permissions on this folder using chmod 777 Any ideas?

Thanks!



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire