Add fare import/exporter #194
This commit is contained in:
@@ -7,6 +7,7 @@ use App\Interfaces\Service;
|
||||
use App\Services\ImportExport\AircraftExporter;
|
||||
use App\Services\ImportExport\AirportExporter;
|
||||
use App\Services\ImportExport\ExpenseExporter;
|
||||
use App\Services\ImportExport\FareExporter;
|
||||
use App\Services\ImportExport\FlightExporter;
|
||||
use Illuminate\Support\Collection;
|
||||
use League\Csv\CharsetConverter;
|
||||
@@ -97,6 +98,18 @@ class ExportService extends Service
|
||||
return $this->runExport($expenses, $exporter);
|
||||
}
|
||||
|
||||
/**
|
||||
* Export all of the fares
|
||||
* @param Collection $fares
|
||||
* @return mixed
|
||||
* @throws \League\Csv\CannotInsertRecord
|
||||
*/
|
||||
public function exportFares($fares)
|
||||
{
|
||||
$exporter = new FareExporter();
|
||||
return $this->runExport($fares, $exporter);
|
||||
}
|
||||
|
||||
/**
|
||||
* Export all of the flights
|
||||
* @param Collection $flights
|
||||
|
||||
Reference in New Issue
Block a user