You can use the withDefault() method to specify a default value for the relationship. This will allow you to retrieve the buyer and seller for an individual deal or a list of deals.
For example, on the Deal model you can define the relationships like this:
public function seller()
{
return $this->belongsTo(Person::class, null, 'seller_person_id')->withDefault();
}
public function buyer()
{
return $this->belongsTo(Person::class, null, 'buyer_person_id')->withDefault();
}
Then you can use the with() method to retrieve the buyer and seller for an individual deal or a list of deals:
$deals = Deal::where('amount', > , 100)->with('buyer')->with('seller')->get();