#32 moved fares to subfleets

This commit is contained in:
Nabeel Shahzad
2017-06-24 11:09:27 -05:00
parent ca74afacd8
commit 3736e530bf
15 changed files with 216 additions and 144 deletions

View File

@@ -50,6 +50,14 @@ class Subfleet extends Model
return $this->belongsTo('App\Models\Airline', 'airline_id');
}
public function fares()
{
return $this->belongsToMany(
'App\Models\Fare',
'subfleet_fare'
)->withPivot('price', 'cost', 'capacity');
}
public function flights()
{
return $this->belongsToMany('App\Models\Flight', 'subfleet_flight');