Why can't you just create a new relationship method in your Person model ? Like :
public function parent(){
return $this->belongsTo('Person', 'parent_entities_id');
}
And then just call:
return $person = Person::with('parent')->findOrFail(1);
Will it do the trick or maybe I am missunderstanding something ?
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community