Answers for "how to delete a file in laravel"

PHP
0

how to delete a file in laravel

// Delete a single file
File::delete($filename);

// Delete multiple files
File::delete($file1, $file2, $file3);

// Delete an array of files
$files = array($file1, $file2);
File::delete($files);

//And don't forget to add at the top:
use Illuminate\Support\Facades\File;
Posted by: Guest on September-13-2021
0

unlink is a directory laravel

$destinationPath = 'your_path';
 File::delete($destinationPath.'/your_file');
Posted by: Guest on May-07-2020

Code answers related to "how to delete a file in laravel"

Browse Popular Code Answers by Language