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

@@ -1,6 +1,6 @@
{
"name": "maatwebsite/excel",
"description": "An eloquent way of importing and exporting Excel and CSV in Laravel 4 with the power of PHPExcel",
"description": "Supercharged Excel exports in Laravel",
"license": "MIT",
"keywords": [
"laravel",
@@ -20,10 +20,10 @@
"require": {
"php": ">=5.5",
"phpoffice/phpexcel": "^1.8.1",
"illuminate/cache": "5.0.*|5.1.*|5.2.*|5.3.*|5.4.*|5.5.*|5.6.*",
"illuminate/config": "5.0.*|5.1.*|5.2.*|5.3.*|5.4.*|5.5.*|5.6.*",
"illuminate/filesystem": "5.0.*|5.1.*|5.2.*|5.3.*|5.4.*|5.5.*|5.6.*",
"illuminate/support": "5.0.*|5.1.*|5.2.*|5.3.*|5.4.*|5.5.*|5.6.*",
"illuminate/cache": "^5.0",
"illuminate/config": "^5.0",
"illuminate/filesystem": "^5.0",
"illuminate/support": "^5.0",
"jeremeamia/superclosure": "^2.3",
"nesbot/carbon": "~1.0",
"tijsverkoyen/css-to-inline-styles": "~2.0"
@@ -35,10 +35,10 @@
"orchestra/testbench": "3.1.*|3.2.*|3.3.*|3.4.*|3.5.*|3.6.*"
},
"suggest": {
"illuminate/http": "5.0.*|5.1.*|5.2.*|5.3.*|5.4.*|5.5.*|5.6.*",
"illuminate/routing": "5.0.*|5.1.*|5.2.*|5.3.*|5.4.*|5.5.*|5.6.*",
"illuminate/view": "5.0.*|5.1.*|5.2.*|5.3.*|5.4.*|5.5.*|5.6.*",
"illuminate/queue": "5.0.*|5.1.*|5.2.*|5.3.*|5.4.*|5.5.*|5.6.*"
"illuminate/http": "^5.0",
"illuminate/routing": "^5.0",
"illuminate/view": "^5.0",
"illuminate/queue": "^5.0"
},
"autoload": {
"classmap": [

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',