Allow export to disable first row as header
This commit is contained in:
parent
c68c4ea839
commit
4fa40d342e
|
|
@ -86,6 +86,7 @@ abstract class ExportModel extends Model
|
|||
* Parse options
|
||||
*/
|
||||
$defaultOptions = [
|
||||
'firstRowTitles' => true,
|
||||
'useOutput' => false,
|
||||
'fileName' => 'export.csv',
|
||||
'delimiter' => null,
|
||||
|
|
@ -118,8 +119,10 @@ abstract class ExportModel extends Model
|
|||
/*
|
||||
* Add headers
|
||||
*/
|
||||
if ($options['firstRowTitles']) {
|
||||
$headers = $this->getColumnHeaders($columns);
|
||||
$csv->insertOne($headers);
|
||||
}
|
||||
|
||||
/*
|
||||
* Add records
|
||||
|
|
|
|||
Loading…
Reference in New Issue