-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] Handle nested relations #22
base: master
Are you sure you want to change the base?
Conversation
Hi @liam-wiltshire. I've tested your piece of code and actual.. it works pretty well! The only thing I see is that it adds a |
public $parentCollection = null; | ||
|
||
/** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
public $parentCollection = null; | |
/** | |
public $parentCollection = null; | |
public $caller; | |
/** |
$collection = $this->relations[$method]; | ||
$collection->caller = (object) ['method' => $method, 'model' => $this]; | ||
return $this->relations[$method]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$collection = $this->relations[$method]; | |
$collection->caller = (object) ['method' => $method, 'model' => $this]; | |
return $this->relations[$method]; | |
$relation = $this->relations[$method]; | |
$relation->caller = (object) ['method' => $method, 'model' => $this]; | |
return $relation; |
@@ -112,7 +112,9 @@ private function logAutoload(string $relationship) | |||
*/ | |||
public function getRelationshipFromMethod($method) | |||
{ | |||
$fqRelation = ""; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$fqRelation = ""; |
Hey @liam-wiltshire, I'm working on a Laravel project again after a few years break, and I found this open PR. 😅 |
No description provided.