<?phpnamespaceIlluminate\Broadcasting;useIlluminate\Support\Facades\Broadcast;traitInteractsWithSockets{/** * The socket ID for the user that raised the event. * * @var string|null */public$socket;/** * Exclude the current user from receiving the broadcast. * * @return $this */publicfunctiondontBroadcastToCurrentUser(){$this->socket=Broadcast::socket();return$this;}/** * Broadcast the event to everyone. * * @return $this */publicfunctionbroadcastToEveryone(){$this->socket=null;return$this;}}