Alternates

This commit is contained in:
2021-08-05 01:22:34 +02:00
parent 772231231d
commit 4fe5935e30
18 changed files with 316 additions and 2 deletions
+9
View File
@@ -38,4 +38,13 @@ class Airport extends Model
'based' => ['GermanAirlinesVa\Fleet\Models\Aircraft', 'key' => 'home_airport_id'],
'occupying' => ['GermanAirlinesVa\Fleet\Models\Aircraft', 'key' => 'airport_id'],
];
public $belongsToMany = [
'alternates' => [
'GermanAirlinesVa\Routes\Models\Airport',
'table' => 'alternates',
'key' => 'airport_id',
'otherKey' => 'alternate_id',
],
];
}