Flag of Ukraine
SymfonyCasts stands united with the people of Ukraine
Next Chapter

Challenge #1 of 1


Q: 

As mentioned in a previous challenge, my chat application is ready to receive updates from our PHP server!

The chat app looks like this:

<div {{ turbo_stream_listen('new-messages') }}></div>

<turbo-frame id="chat-messages">
    {{ include('chat/_messages.html.twig') }}
</div>

<turbo-frame id="user-list">
    {{ include('chat/_user-list.html.twig') }}
</div>

How can I we publish a turbo stream from our server that will update the chat-messages element with a new message for all users?

userVoice