Symfony UX: Turbo
Publishing Mercure Updates in PHP
  Start your All-Access Pass to unlock this challenge
Buy Access Login

Challenge 1 / 1

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?

Skip challenges and go to theNext Chapter

Turn Challenges Off?

All further challenges will be skipped automatically.
You can re-enable challenges at any time on this page or from your account page.