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