Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Platform
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
Platform
Commits
5d1ebbda
Commit
5d1ebbda
authored
Aug 30, 2017
by
Mehedi Hassan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bind current object to the dynamic relations closure
parent
33e556f1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
User.php
Modules/User/Entities/Sentinel/User.php
+1
-1
config.php
config/asgard/user/config.php
+2
-2
No files found.
Modules/User/Entities/Sentinel/User.php
View file @
5d1ebbda
...
...
@@ -114,7 +114,7 @@ class User extends EloquentUser implements UserInterface, AuthenticatableContrac
if
(
config
()
->
has
(
$config
))
{
$function
=
config
()
->
get
(
$config
);
return
$function
(
$this
);
return
$function
->
bindTo
(
$this
);
}
#i: No relation found, return the call to parent (Eloquent) to handle it.
...
...
config/asgard/user/config.php
View file @
5d1ebbda
...
...
@@ -85,8 +85,8 @@ return [
| Add relations that will be dynamically added to the User entity
*/
'relations'
=>
[
// 'extension' => function (
$self
) {
// return $
self
->belongsTo(UserExtension::class, 'user_id', 'id')->first();
// 'extension' => function () {
// return $
this
->belongsTo(UserExtension::class, 'user_id', 'id')->first();
// }
],
/*
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment