From 1255c35731dd6cc815bd261fb5883f12eabd7816 Mon Sep 17 00:00:00 2001 From: Wouter van Marrum Date: Mon, 3 Apr 2017 11:51:05 +0200 Subject: [PATCH] Added `deleteFileAfterSend()` back in the docs it is a feature. --- responses.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/responses.md b/responses.md index 9acb20c0eb5..9ad063e4dde 100644 --- a/responses.md +++ b/responses.md @@ -213,6 +213,8 @@ The `download` method may be used to generate a response that forces the user's return response()->download($pathToFile); return response()->download($pathToFile, $name, $headers); + + return response()->download($pathToFile)->deleteFileAfterSend(true); > {note} Symfony HttpFoundation, which manages file downloads, requires the file being downloaded to have an ASCII file name.