Inital commit for unit test configuration

This commit is contained in:
Manish Verma
2018-09-05 12:36:46 +05:30
committed by Manish Verma
parent 2f0796e954
commit e0436b7757
252 changed files with 3219 additions and 1631 deletions

View File

@@ -84,7 +84,7 @@ class LaravelExcelReader
/**
* The parsed file
*
* @var SheetCollection|RowCollection
* @var \Maatwebsite\Excel\Collections\RowCollection|\Maatwebsite\Excel\Collections\SheetCollection
*/
public $parsed;

View File

@@ -346,12 +346,18 @@ class LaravelExcelWriter {
*/
protected function _download(Array $headers = [])
{
$filename = $this->filename;
$userAgent = isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : '';
// Just for Microsoft Explore
if (preg_match('/Trident|Edge/i', $userAgent)) {
$filename = rawurlencode($filename);
}
// Set the headers
$this->_setHeaders(
$headers,
[
'Content-Type' => $this->contentType,
'Content-Disposition' => 'attachment; filename="' . $this->filename . '.' . $this->ext . '"',
'Content-Disposition' => 'attachment; filename="' . $filename . '.' . $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',