Improve CheckClientExistence.php middleware
This commit is contained in:
parent
5b78717de4
commit
a48556a557
1 changed files with 2 additions and 0 deletions
|
|
@ -31,6 +31,8 @@ class CheckClientExistence
|
|||
$multiple_contacts = ClientContact::query()
|
||||
->where('email', auth('contact')->user()->email)
|
||||
->whereNotNull('email')
|
||||
->where('email', '<>', '')
|
||||
->where('account_id', auth('contact')->user()->client->company->account->id)
|
||||
->whereNull('deleted_at')
|
||||
->distinct('company_id')
|
||||
->distinct('email')
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue