Spec-Zone.ru › Laravel 5.8

Отправитель Уведомлений

класс NotificationSender (Просмотреть исходный код)

Трейты

Локализуемый

Свойства

protected ChannelManager $manager Экземпляр менеджера уведомлений.
protected Dispatcher $bus Экземпляр диспетчера Bus.
protected Dispatcher $events Диспетчер событий.
protected string|null $locale Язык для отправки уведомлений.

Методы

mixed withLocale(string $locale, Closure $callback)

Выполнить callback с заданным языком.

из Локализуемый
void __construct(ChannelManager $manager, Dispatcher $bus, Dispatcher $events, string|null $locale = null)

Создать новый экземпляр отправителя уведомлений.

void send(Collection|array|mixed $notifiables, mixed $notification)

Отправить заданное уведомление заданным сущностям.

void sendNow(Collection|array|mixed $notifiables, mixed $notification, array $channels = null)

Отправить заданное уведомление немедленно.

string|null preferredLocale(mixed $notifiable, mixed $notification)

Получить предпочитаемый язык получателя для уведомления.

void sendToNotifiable(mixed $notifiable, string $id, mixed $notification, string $channel)

Отправить заданное уведомление получателю через канал.

bool shouldSendNotification(mixed $notifiable, mixed $notification, string $channel)

Определяет, можно ли отправить уведомление.

void queueNotification($notifiables, $notification)

Поместить заданные экземпляры уведомлений в очередь.

Collection|array formatNotifiables(mixed $notifiables)

Форматировать сущности уведомлений в Collection / массив, если необходимо.

Детали

mixed withLocale(string $locale, Closure $callback)

Выполнить callback с заданным языком.

Параметры

string $locale
Closure $callback

Возвращаемое значение

mixed

void __construct(ChannelManager $manager, Dispatcher $bus, Dispatcher $events, string|null $locale = null)

Создать новый экземпляр отправителя уведомлений.

Параметры

ChannelManager $manager
Dispatcher $bus
Dispatcher $events
string|null $locale

Возвращаемое значение

void

void send(Collection|array|mixed $notifiables, mixed $notification)

Отправить заданное уведомление заданным сущностям.

Параметры

Collection|array|mixed $notifiables
mixed $notification

Возвращаемое значение

void

void sendNow(Collection|array|mixed $notifiables, mixed $notification, array $channels = null)

Отправить заданное уведомление немедленно.

Параметры

Collection|array|mixed $notifiables
mixed $notification
array $channels

Возвращаемое значение

void

protected string|null preferredLocale(mixed $notifiable, mixed $notification)

Получить предпочитаемый язык получателя для уведомления.

Параметры

mixed $notifiable
mixed $notification

Возвращаемое значение

string|null

protected void sendToNotifiable(mixed $notifiable, string $id, mixed $notification, string $channel)

Отправить заданное уведомление получателю через канал.

Параметры

mixed $notifiable
string $id
mixed $notification
string $channel

Возвращаемое значение

void

protected bool shouldSendNotification(mixed $notifiable, mixed $notification, string $channel)

Определяет, можно ли отправить уведомление.

Параметры

mixed $notifiable
mixed $notification
string $channel

Возвращаемое значение

bool

protected void queueNotification($notifiables, $notification)

Поместить заданные экземпляры уведомлений в очередь.

Параметры

$notifiables
$notification

Возвращаемое значение

void

protected Collection|array formatNotifiables(mixed $notifiables)

Форматировать сущности уведомлений в Collection / массив, если необходимо.

Параметры

mixed $notifiables

Возвращаемое значение

Collection|array

© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/5.8/Illuminate/Notifications/NotificationSender.html

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API