Open sidebar
protected function _download() { // Set the headers $this->_setHeaders(array( 'Content-Type' => $this->contentType, 'Content-Disposition' => 'attachment; filename="' . $this->title . '.' . $this->ext . '"', 'Expires' => 'Mon, 26 Jul 1997 05:00:00 GMT', // Date in the past 'Last-Modified' => Carbon::now()->format('D, d M Y H:i:s'), 'Cache-Control' => 'cache, must-revalidate', 'Pragma' => 'no-cache' )); // Check if writer isset if(!$this->writer) throw new LaravelExcelException('[ERROR] No writer was set.'); // Download $this->writer->save('php://output'); }
Close sidebar
Back
Please note that all pasted data is publicly available.
Twitter
GitHub
Use setting
Back
Please note that all pasted data is publicly available.
Twitter
GitHub
Use setting