hasMany(InvoicePayment::class); } public function order() { return $this->belongsTo(Order::class); } public function customer() { return $this->belongsToThrough(Customer::class, Order::class, null, '', [Customer::class => 'customer_id', Order::class => 'order_id']); } }