I have a user node. And each user has Profile node. User node has "name" and "address" And in Profile node there are "age","status". But, I can't figure out how do I get the "name" and "address" from the Profile. I have created relation like below. But, when I retrieve information of Profile, I only get "age" and "status". How do I do that?
public function user(){
return $this->belongsTo('App\Models\Neo\user\User','name', 'Profile');
}
public function Profile(){
return $this->hasMany('App\Models\Neo\user\ProfileOfUser','name', 'Profile');
}
from Newest questions tagged laravel-5 - Stack Overflow https://stackoverflow.com/questions/45205392/retrieving-data-from-the-parent-node-in-neoeloquent
via IFTTT
Aucun commentaire:
Enregistrer un commentaire