/
githubmirror
/
framework
Обзор
Документация
Войти
/
githubmirror
/
framework
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
13.x
src/Illuminate/Broadcasting/InteractsWithBroadcasting.php
44 строки
931 B
Amir Hossein Shokri
[12.x] Add unified enum support across framework docs (#56271)
16 июл 2025, 16:18
Не верифицирован
16 июл 2025, 16:18
2c682e4
Код
Авторство
О чём код?
<?php namespace Illuminate\Broadcasting; use Illuminate\Support\Arr; use function Illuminate\Support\enum_value; trait InteractsWithBroadcasting { /** * The broadcaster connection to use to broadcast the event. * * @var array */ protected $broadcastConnection = [null]; /** * Broadcast the event using a specific broadcaster. * * @param \UnitEnum|array|string|null $connection * @return $this */ public function broadcastVia($connection = null) { $connection = enum_value($connection); $this->broadcastConnection = is_null($connection) ? [null] : Arr::wrap($connection); return $this; } /** * Get the broadcaster connections the event should be broadcast on. * * @return array */ public function broadcastConnections() { return $this->broadcastConnection; } }