Fix column headers

This commit is contained in:
Nabeel Shahzad
2018-03-30 20:57:30 -05:00
parent 70e5ccda6f
commit 217da07007
5 changed files with 8 additions and 3 deletions
+1 -1
View File
@@ -53,7 +53,7 @@ class ExportService extends Service
$writer = $this->openCsv($path);
// Write out the header first
$writer->insertOne(array_keys($exporter->getColumns()));
$writer->insertOne($exporter->getColumns());
// Write the rest of the rows
foreach ($collection as $row) {
@@ -4,7 +4,6 @@ namespace App\Services\ImportExport;
use App\Interfaces\ImportExport;
use App\Models\Enums\Days;
use App\Models\Enums\FlightType;
use App\Models\Flight;
/**
@@ -47,7 +46,6 @@ class FlightExporter extends ImportExport
}
$ret['days'] = $this->getDays($flight);
#$ret['flight_type'] = FlightType::convertToCode($ret['flight_type']);
$ret['fares'] = $this->getFares($flight);
$ret['fields'] = $this->getFields($flight);