-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Relationship issue #2402
Unanswered
jaymeen1
asked this question in
Show and tell
Relationship issue
#2402
-
How can i connect my json object data?
Example
"kindAttn": {
"label": "Jerry",
"value": "629f0f65fd91257cc17a2542"
}
this is an example for stored data now i'll try to relationship with users table using this kindAttn value so how can i do that?
Here is my code for relation
/**
* @return \Jenssegers\Mongodb\Relations\HasOne
*/
public function kindAttnDetails()
{
return $this->hasOne(ContactPerson::class,'_id','kindAttn->value');
}
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment