update api register
This commit is contained in:
@@ -100,6 +100,18 @@ class CustomerService
|
||||
'registration',
|
||||
['action_url' => "/customers/orders/{$customer->id}/detail"],
|
||||
);
|
||||
User::query()
|
||||
->whereHas('userTenants', fn ($query) => $query
|
||||
->where('tenant_id', $customer->tenant_id)
|
||||
->where('role', 'tenant_owner'))
|
||||
->each(fn (User $owner) => $this->notifications->emit(
|
||||
'customer.registration',
|
||||
$owner,
|
||||
$customer,
|
||||
['customer' => $customer->toArray(), 'tenant' => $customer->tenant?->toArray() ?? []],
|
||||
'registration',
|
||||
['action_url' => "/customers/orders/{$customer->id}/detail", 'icon' => 'cil-user-follow'],
|
||||
));
|
||||
|
||||
return $customer->load(self::DETAIL_RELATIONS);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user