Skip to content

Miscellaneous

channelSSETag()

channelSSETag() — returns string

Available in: controller

Generate a ‘script’ tag that creates an EventSource for a channel. Convenience view helper for quickly wiring up SSE in templates.

NameTypeRequiredDefaultDescription
channelstringyesThe channel name.
routestringnoNamed route for the SSE endpoint.
controllerstringnoController name (used with action if no route).
actionstringnostreamAction name (default “stream”).
eventsstringnoComma-delimited list of event types.