class AnonymousEvent implements ShouldBroadcast (View source)
| Dispatchable | |
| InteractsWithBroadcasting | |
| InteractsWithSockets |
| protected array | $broadcastConnection | The broadcaster connection to use to broadcast the event. | from InteractsWithBroadcasting |
| string|null | $socket | The socket ID for the user that raised the event. | from InteractsWithSockets |
| protected | $connection | The connection the event should be broadcast on. | |
| protected | $name | The name the event should be broadcast as. | |
| protected | $payload | The payload the event should be broadcast with. | |
| protected | $includeCurrentUser | Should the broadcast include the current user. | |
| protected | $shouldBroadcastNow | Indicates if the event should be broadcast synchronously. |
| static mixed | dispatch()
Dispatch the event with the given arguments. | from Dispatchable |
| static mixed | dispatchIf(bool $boolean, mixed ...$arguments)
Dispatch the event with the given arguments if the given truth test passes. | from Dispatchable |
| static mixed | dispatchUnless(bool $boolean, mixed ...$arguments)
Dispatch the event with the given arguments unless the given truth test passes. | from Dispatchable |
| static PendingBroadcast | broadcast()
Broadcast the event with the given arguments. | from Dispatchable |
| $this | broadcastVia(array|string|null $connection = null)
Broadcast the event using a specific broadcaster. | from InteractsWithBroadcasting |
| array | broadcastConnections()
Get the broadcaster connections the event should be broadcast on. | from InteractsWithBroadcasting |
| $this | dontBroadcastToCurrentUser()
Exclude the current user from receiving the broadcast. | from InteractsWithSockets |
| $this | broadcastToEveryone()
Broadcast the event to everyone. | from InteractsWithSockets |
| void | __construct(Channel|array|string $channels)
Create a new anonymous broadcastable event instance. | |
| AnonymousEvent | via(string $connection)
Set the connection the event should be broadcast on. | |
| AnonymousEvent | as(string $name)
Set the name the event should be broadcast as. | |
| AnonymousEvent | with(Arrayable|array $payload)
Set the payload the event should be broadcast with. | |
| AnonymousEvent | toOthers()
Broadcast the event to everyone except the current user. | |
| void | sendNow()
Broadcast the event. | |
| void | send()
Broadcast the event. | |
| string | broadcastAs()
Get the name the event should broadcast as. | |
| array | broadcastWith()
Get the payload the event should broadcast with. | |
| Channel|Channel[]|string[]|string | broadcastOn()
Get the channels the event should broadcast on. | |
| bool | shouldBroadcastNow()
Determine if the event should be broadcast synchronously. |
Dispatch the event with the given arguments.
Dispatch the event with the given arguments if the given truth test passes.
Dispatch the event with the given arguments unless the given truth test passes.
Broadcast the event with the given arguments.
Broadcast the event using a specific broadcaster.
Get the broadcaster connections the event should be broadcast on.
Exclude the current user from receiving the broadcast.
Broadcast the event to everyone.
Create a new anonymous broadcastable event instance.
Set the connection the event should be broadcast on.
Set the name the event should be broadcast as.
Set the payload the event should be broadcast with.
Broadcast the event to everyone except the current user.
Broadcast the event.
Broadcast the event.
Get the name the event should broadcast as.
Get the payload the event should broadcast with.
Determine if the event should be broadcast synchronously.
© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/11.x/Illuminate/Broadcasting/AnonymousEvent.html