#32 subfleet classificiation scaffolding

This commit is contained in:
Nabeel Shahzad
2017-06-22 20:55:45 -05:00
parent 6bbb37061b
commit aaaead77a5
28 changed files with 493 additions and 348 deletions

View File

@@ -52,22 +52,19 @@ class Aircraft extends Model
];
/**
* foreign key
* foreign keys
*/
public function class()
{
return $this->belongsTo(
'App\Models\AircraftClass',
'aircraft_class_id'
);
}
public function fares()
{
$r = $this->belongsToMany(
return $this->belongsToMany(
'App\Models\Fare',
'aircraft_fare'
)->withPivot('price', 'cost', 'capacity');
return $r;
}
public function subfleet()
{
return $this->belongsTo('App\Models\Subfleet', 'subfleet_id');
}
}