Skip to content

Commit

Permalink
Add parent relationship to result #25
Browse files Browse the repository at this point in the history
  • Loading branch information
drewroberts authored Mar 27, 2021
1 parent 241826c commit da4319c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Models/Result.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ public function ranking()
{
return $this->belongsTo(app('ranking'));
}

public function parent()
{
return $this->belongsTo(app('result'), 'parent_id');
}

public function resultable()
{
Expand Down

0 comments on commit da4319c

Please sign in to comment.