Import/export expenses #194

This commit is contained in:
Nabeel Shahzad
2018-03-22 17:17:37 -05:00
parent 4e3a9fd9ea
commit a44204b185
32 changed files with 613 additions and 139 deletions

View File

@@ -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