diff --git a/app/Notifications/UniqueContact.php b/app/Notifications/UniqueContact.php index 9c2f5c3..03c5859 100644 --- a/app/Notifications/UniqueContact.php +++ b/app/Notifications/UniqueContact.php @@ -55,12 +55,17 @@ public function toMail(object $notifiable): MailMessage */ public function toArray(object $notifiable): array { + $clientsPhones = $this->deal->clients->pluck('phone')->toArray(); $clientsNames = $this->deal->clients->pluck('name')->toArray(); + foreach ($clientsNames as $key=>$name) { + $clientsNames[$key] = $name . ' ' . $clientsPhones[$key] .''; + } return [ 'deal' => $this->deal->id, 'text' => __('notifications.' . get_class($this), [ - 'contact' => implode(', ', $clientsNames) + 'contact' => implode(', ', $clientsNames), + 'complex' => $this->deal->complex->name, ]) ]; } diff --git a/lang/ru/notifications.php b/lang/ru/notifications.php index 47997f2..b28ed48 100644 --- a/lang/ru/notifications.php +++ b/lang/ru/notifications.php @@ -15,7 +15,8 @@ 'has no notifications' => 'Список уведомлений пуст', 'has no history' => 'История изменений отсутствует', - 'App\Notifications\UniqueContact' => 'Контакт :contact был проверен, уникальность подтверждена', + 'App\Notifications\UniqueContact' => 'Контакт :contact был проверен, уникальность подтверждена на ЖК ":complex". С Вами свяжется ответственный менеджер.', + //'App\Notifications\UniqueContact' => 'Контакт :contact был проверен, уникальность подтверждена', 'App\Notifications\NotUniqueContact' => 'Контакт :contact был проверен и является не уникальным', 'App\Notifications\ContractUpdated' => 'Информация о договоре для контакта ":contact" обновлен',