hesabixSite/templates/broadcast/Post.stream.html.twig

23 lines
637 B
Twig
Raw Permalink Normal View History

2025-01-09 10:21:26 +03:30
{# Learn how to use Turbo Streams: https://github.com/symfony/ux-turbo#broadcast-doctrine-entities-update #}
{% block create %}
<turbo-stream action="append" target="posts">
<template>
<div id="{{ 'post_' ~ id }}">
#{{ id }} created
</div>
</template>
</turbo-stream>
{% endblock %}
{% block update %}
<turbo-stream action="update" target="post_{{ id }}">
<template>
#{{ id }} updated
</template>
</turbo-stream>
{% endblock %}
{% block remove %}
<turbo-stream action="remove" target="post_{{ id }}"></turbo-stream>
{% endblock %}