From 107fd41c83389ca6c75a4cfc65d88480f4136be7 Mon Sep 17 00:00:00 2001 From: iRaziul Date: Fri, 21 Jun 2024 09:54:50 +0600 Subject: [PATCH] Fix return type for `continent` relation --- packages/airlines/src/Models/Airline.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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); }