Spec-Zone.ru › Laravel 10

NotificationSender

class NotificationSender (View source)

Трейты

Localizable

Свойства

protected ChannelManager $manager

Экземпляр менеджера уведомлений.

protected Dispatcher $bus

Экземпляр диспетчера очереди.

protected Dispatcher $events

Диспетчер событий.

protected string|null $locale

Язык, который будет использоваться при отправке уведомлений.

Методы

mixed withLocale(string $locale, Closure $callback)

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

из Localizable
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(mixed $notifiables, Notification $notification)

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

Collection|array formatNotifiables(mixed $notifiables)

Отформатировать сущности в коллекцию/массив, если необходимо.

Подробности

mixed withLocale(string $locale, Closure $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(mixed $notifiables, Notification $notification)

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

Параметры

mixed $notifiables
Notification $notification

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

void

protected Collection|array formatNotifiables(mixed $notifiables)

Форматировать уведомления в Коллекцию / массив, если необходимо.

Параметры

mixed $notifiables

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

Collection|array

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

Spec-Zone.ru

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