Spec-Zone.ru › Laravel 8

NotificationSender

class NotificationSender (View source)

Traits

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

Properties

protected ChannelManager $manager

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

protected Dispatcher $bus

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

protected Dispatcher $events

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

protected string|null $locale

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

Methods

mixed withLocale(string $locale, Closure $callback)

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

from Локализуемый
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)

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

Details

mixed withLocale(string $locale, Closure $callback)

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

Parameters

string $locale
Closure $callback

Return Value

mixed

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

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

Parameters

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

Return Value

void

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

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

Parameters

Collection|array|mixed $notifiables
mixed $notification

Return Value

void

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

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

Parameters

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

Return Value

void

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

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

Parameters

mixed $notifiable
mixed $notification

Return Value

string|null

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

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

Parameters

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

Return Value

void

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

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

Parameters

mixed $notifiable
mixed $notification
string $channel

Return Value

bool

protected void queueNotification(mixed $notifiables, Notification $notification)

Поместить уведомление в очередь.

Parameters

mixed $notifiables
Notification $notification

Return Value

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/8.x/Illuminate/Notifications/NotificationSender.html

Spec-Zone.ru

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