Skip to content

Commit

Permalink
Merge pull request #84 from iRaziul/3.x
Browse files Browse the repository at this point in the history
Fix return type for `continent` relation
  • Loading branch information
danharrin authored Jul 1, 2024
2 parents cc04954 + 107fd41 commit 7bb7e8a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/airlines/src/Models/Airline.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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);
}
Expand Down

0 comments on commit 7bb7e8a

Please sign in to comment.