Skip to content

Commit

Permalink
Add layout relationship to page model #60
Browse files Browse the repository at this point in the history
  • Loading branch information
drewroberts authored Apr 7, 2021
1 parent 1b48a6a commit 96801e9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Models/Page.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,11 @@ public function getRouteKeyName()
{
return 'slug';
}

public function layout()
{
return $this->belongsTo(app('layout'));
}

public function author()
{
Expand Down

0 comments on commit 96801e9

Please sign in to comment.