protected function setCsvHeaders(Response $response) { $response->header('Content-Type', 'application/csv'); $response->header('Content-Disposition', 'attachment; filename=' . $this->getFileName()); $response->header('Pragma', 'no-cache'); }