Export flights to CSV in admin #194

This commit is contained in:
Nabeel Shahzad
2018-03-21 17:07:30 -05:00
parent 95a7365fee
commit 276b93fc57
10 changed files with 404 additions and 30 deletions

View File

@@ -98,6 +98,12 @@ class FareService extends Service
{
$flight->fares()->syncWithoutDetaching([$fare->id]);
foreach($override as $key => $item) {
if(!$item) {
unset($override[$key]);
}
}
# modify any pivot values?
if (\count($override) > 0) {
$flight->fares()->updateExistingPivot($fare->id, $override);