Skip to content

Commit

Permalink
fix parent trait
Browse files Browse the repository at this point in the history
  • Loading branch information
sten committed Nov 7, 2023
1 parent 44e624f commit e9c9157
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Models/Concerns/HasParentTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ trait HasParentTrait
{
public function parent(): BelongsTo
{
return $this->belongsTo(self::class, 'parent_id');
return $this->belongsTo(static::class, 'parent_id');
}

public function children(): HasMany
{
return $this->hasMany(self::class, 'parent_id');
return $this->hasMany(static::class, 'parent_id');
}

public function hasParent(): bool
Expand Down

0 comments on commit e9c9157

Please sign in to comment.