Add headers to csv file. #539
This commit is contained in:
parent
fd8845118e
commit
8f839674b5
1 changed files with 17 additions and 0 deletions
|
|
@ -77,6 +77,23 @@ class GenerateCustomerSourceReportCommand extends Command
|
|||
'year' => $year,
|
||||
]);
|
||||
|
||||
// add header rows
|
||||
fputcsv($fp, [
|
||||
'Customer ID',
|
||||
'First Name',
|
||||
'Last Name',
|
||||
'Mobile Phone',
|
||||
'Landline',
|
||||
'Office Phone',
|
||||
'Fax',
|
||||
'Email Address',
|
||||
'Vehicle Manufacturer',
|
||||
'Vehicle Make',
|
||||
'Model Year',
|
||||
'Plate Number',
|
||||
'Source',
|
||||
]);
|
||||
|
||||
// go through rows
|
||||
while ($row = $stmt->fetch(PDO::FETCH_NUM))
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue