Skip to content

Commit

Permalink
Fix return type for continent relation
Browse files Browse the repository at this point in the history
  • Loading branch information
iRaziul committed Jun 21, 2024
1 parent cc04954 commit 107fd41
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 107fd41

Please sign in to comment.