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
channelstringyes—The channel name.
routestringno—Named route for the SSE endpoint.
controllerstringno—Controller name (used with action if no route).
actionstringnostreamAction name (default “stream”).
eventsstringno—Comma-delimited list of event types.