diff --git a/packages/airlines/src/Models/Airline.php b/packages/airlines/src/Models/Airline.php index 0d1bf9a..7674313 100644 --- a/packages/airlines/src/Models/Airline.php +++ b/packages/airlines/src/Models/Airline.php @@ -3,6 +3,7 @@ namespace Squire\Models; use Illuminate\Database\Eloquent\Relations\BelongsTo; +use Illuminate\Database\Eloquent\Relations\HasOneThrough; use Squire\Model; class Airline extends Model @@ -22,7 +23,7 @@ public function country(): BelongsTo return $this->belongsTo(Country::class); } - public function continent(): BelongsTo + public function continent(): HasOneThrough { return $this->hasOneThrough(Continent::class, Country::class); }