“Laravel Excluir arquivo antigo” Respostas de código

Como excluir um arquivo em 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; 
Flashmaru

Laravel Excluir arquivo após download

$filePath = public_path($file_name); //ex.
return Response::download($filePath)->deleteFileAfterSend(true);
Lazurite

Laravel Excluir arquivo antigo

$oldFile = House::select('photo')->where('name', $request->name)->first()->photo;
Storage::delete($oldFile);
DJ Ultimate Disco Party

Respostas semelhantes a “Laravel Excluir arquivo antigo”

Perguntas semelhantes a “Laravel Excluir arquivo antigo”

Mais respostas relacionadas para “Laravel Excluir arquivo antigo” em PHP

Procure respostas de código populares por idioma

Procurar outros idiomas de código