Fix column headers
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user