diff --git a/app/Http/Controllers/QuestionController.php b/app/Http/Controllers/QuestionController.php index 516ac58..a55e268 100644 --- a/app/Http/Controllers/QuestionController.php +++ b/app/Http/Controllers/QuestionController.php @@ -248,6 +248,13 @@ class QuestionController extends Controller $w->insertOne([]); } + // * Push empty line if nothing to export + if (empty($results)) { + $w->insertOne([ + 'Aucune question pour cette marque' + ]); + } + /* We create a callable to output the CSV in chunk with Symfony StreamResponse you can flush the body content if necessary