Commit fd007017 authored by Micheal Mand's avatar Micheal Mand

Fix example dynamic relations on Page and User

Signed-off-by: 's avatarMicheal Mand <micheal@kmdwebdesigns.com>
parent 887275df
...@@ -25,8 +25,8 @@ return [ ...@@ -25,8 +25,8 @@ return [
| Add relations that will be dynamically added to the Page entity | Add relations that will be dynamically added to the Page entity
*/ */
'relations' => [ 'relations' => [
// 'extension' => function ($self) { // 'extension' => function (): \Illuminate\Database\Eloquent\Relations\BelongsTo {
// return $self->belongsTo(PageExtension::class, 'id', 'page_id')->first(); // return $this->belongsTo(PageExtension::class, 'id', 'page_id')->first();
// } // }
], ],
/* /*
......
...@@ -85,8 +85,8 @@ return [ ...@@ -85,8 +85,8 @@ return [
| Add relations that will be dynamically added to the User entity | Add relations that will be dynamically added to the User entity
*/ */
'relations' => [ 'relations' => [
// 'extension' => function ($self) { // 'extension' => function (): \Illuminate\Database\Eloquent\Relations\BelongsTo {
// return $self->belongsTo(UserExtension::class, 'user_id', 'id')->first(); // return $this->belongsTo(UserExtension::class, 'user_id', 'id')->first();
// } // }
], ],
/* /*
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment