* $order->belongsTo(Customer::class, 'customer_id') * ); */ public function boot(): void { // Register cross-domain relationships below. Client::resolveRelationUsing('transaction', fn (Client $client) => $client->hasMany( related: Invoice::class, foreignKey: 'client_id' )); Invoice::resolveRelationUsing('client', fn (Invoice $transaction) => $transaction->belongsTo( related: Client::class, foreignKey: 'client_id' )); Client::resolveRelationUsing('product_mapping', fn (Client $client) => $client->hasMany( related: ProductMapping::class, foreignKey: 'client_id' )); ProductMapping::resolveRelationUsing('client', fn (ProductMapping $productMapping) => $productMapping->belongsTo( related: Client::class, foreignKey: 'client_id' )); } }