Answers for "laravel delete file from storage"

PHP
0

laravel delete file from path

You could use PHP unlink() method

But if you want to do it the Laravel way, use the File::delete() method instead.
  
use Illuminate\Support\Facades\File; 
  
// 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);
Posted by: Guest on April-16-2021
0

laravel filesystem

$exists = Storage::disk('s3')->exists('file.jpg');
Posted by: Guest on October-06-2020

Code answers related to "laravel delete file from storage"

Browse Popular Code Answers by Language