Closed mjgr0013 closed 4 years ago
Can you please confirm this is still valid?
Hi,
Yes is still valid, if you need any extra information just ask for it.
Thanks.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Hi,
Suposing a User who rate himself, or another user, we have a belongsMany relationship, my User has this relationship:
public function getRecommendedUsers () {
return $this->belongsToMany(User::class, 'Conoce');
}
And I asign the relation like this:
$user->getRecommendedUsers()->attach(Auth::user(), ["edge_atr_1" => "at1", "edge_att_2" => "at2]));
This output me an EdgeIn relation at the time the relationship is created.But after, when I try to get this Edge:
Auth::user()->getRecommendedUsers()->edge()
This returns a collection, due to belongsToMany, so when I pass a certain object in the edge like this:$user->getRecommendedUsers()->edge($user->getRecommendedUsers[0])
I get this error:FatalThrowableError in Finder.php line 173: Type error: Argument 1 passed to Vinelab\NeoEloquent\Eloquent\Edges\Finder::edgeFromRelationWithDirection() must be an instance of Everyman\Neo4j\Relationship, boolean given, called in /var/www/vendor/vinelab/neoeloquent/src/Vinelab/NeoEloquent/Eloquent/Edges/Finder.php on line 88
How can I get the edge who match a User with himself?
Thanks.