public function entity() { $vendor = parent::entity(); // eager load the contacts if ($vendor && !$vendor->relationLoaded('vendor_contacts')) { $vendor->load('vendor_contacts'); } return $vendor; }
public function entity() { $client = parent::entity(); // eager load the contacts if ($client && !$client->relationLoaded('contacts')) { $client->load('contacts'); } return $client; }
public function entity() { $expense = parent::entity(); // eager load the documents if ($expense && !$expense->relationLoaded('documents')) { $expense->load('documents'); } return $expense; }
public function entity() { $invoice = parent::entity(); // eager load the invoice items if ($invoice && !$invoice->relationLoaded('invoice_items')) { $invoice->load('invoice_items'); } return $invoice; }