Fix send message request
This commit is contained in:
parent
c1aeeebcc5
commit
0ec8c6b23c
1 changed files with 4 additions and 4 deletions
|
|
@ -40,16 +40,16 @@ class SendMessageRequest extends FormRequest
|
|||
$customer = Customer::query()->where('username', $value)->firstOrFail();
|
||||
if (
|
||||
BlockList::query()
|
||||
->whereHas('customer', fn (Builder $q) => $q->where('id', $authCustomer->id))
|
||||
->whereHas('blocked', fn (Builder $q) => $q->where('id', $customer->id))
|
||||
->whereHas('customer', fn (Builder $q) => $q->where('id', $customer->id))
|
||||
->whereHas('blocked', fn (Builder $q) => $q->where('id', $authCustomer->id))
|
||||
->exists()
|
||||
) {
|
||||
$fail(trans('Vous ne pouvez pas envoyer de message à cet utilisateur'));
|
||||
}
|
||||
if (
|
||||
BlockList::query()
|
||||
->whereHas('customer', fn (Builder $q) => $q->where('id', $customer->id))
|
||||
->whereHas('blocked', fn (Builder $q) => $q->where('id', $authCustomer->id))
|
||||
->whereHas('customer', fn (Builder $q) => $q->where('id', $authCustomer->id))
|
||||
->whereHas('blocked', fn (Builder $q) => $q->where('id', $customer->id))
|
||||
->exists()
|
||||
) {
|
||||
$fail(trans('Vous avez bloqué cet utilisateur'));
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue