Tuesday, March 14, 2017

How to delete files in laravel 5.4

i am using laravel 5 and i try to delete a list of files, but files are not deleted, here is my code :

public function deleteFiles(){
    $files_names = INPUT::get("files_names");
    Storage::disk('outside')->delete($files_names);
  }

and this is my laravel filesystems:

 'outside' => [
            'driver' => 'local',
            'root' => '/var/pmta/boite/',
     ],

i tried also :

Storage::delete($files_names);
unlink($files_names)

but it does not working either.



via GENE

Advertisement