Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Turbo Toast Bundle Laravel Package

marilenarm/turbo-toast-bundle

A Symfony bundle that adds Turbo-powered toast notifications to your app. Trigger flash-style success, error, and info messages from controllers, render them instantly via Turbo Streams, and customize styling with minimal setup.

View on GitHub
Deep Wiki
Context7

Getting Started

  • This is a Symfony bundle for Turbo Toast, not a Laravel package. In a Laravel app there is no service provider, facade, Blade component, or Artisan command to install. Reach for it only when you are already running Symfony UX Turbo/Stimulus in a Symfony app or mixed stack.
  • In Symfony, install it with Composer and let Flex register the bundle:
    composer require marilenarm/turbo-toast-bundle
    
    Verify the exact vendor/package name on Packagist/README before adding it to CI.
  • Ensure symfony/ux-turbo and symfony/stimulus-bundle are installed. As of v0.4.0 the bundle accepts ^2.13 || ^3.0 for both.
  • Look first at the bundle README, config/bundles.php, the bundle’s Twig template, and its Stimulus controller identifier. Those are the integration points you will touch day to day.
  • First use case: after a controller action, return a Turbo Stream response that appends a toast to a container in your base layout. No full-page reload and no custom JavaScript toast implementation.

Implementation Patterns

  • Put a toast container in your base layout, outside Turbo Frames that get replaced. Attach the bundle’s Stimulus controller to it, or let the bundle render the container if that is how the README wires it.
  • From controllers, return a Turbo Stream response for create/update/delete actions. Use an append or update action targeting the toast container, with the toast markup rendered server-side.
  • For form submissions, combine Turbo Frames and Turbo Streams: validation errors re-render the frame; success streams a toast and updates the affected list or redirects.
  • Keep toast HTML in Twig partials/templates so translations, escaping, and message formatting stay server-side. Do not build toast markup in ad-hoc JavaScript unless the bundle explicitly expects that.
  • If your app supports both UX majors, mirror the bundle’s CI approach: run separate jobs that resolve UX 2 and UX 3 with composer update --with symfony/ux-turbo:^2.13 and composer update --with symfony/ux-turbo:^3.0, then assert the resolved major with composer show symfony/ux-turbo.
  • Pin the UX major in your root composer.json when behavior must be deterministic. The bundle deliberately does not force UX 3; your application constraints decide.

Gotchas and Tips

  • Do not treat this as a Laravel package. There is no Blade directive, Laravel Mix/Vite preset, or Laravel-specific configuration. Adding it to a Laravel app will not give you drop-in toasts.
  • The widened UX constraint is permissive, not prescriptive. composer update will not move you to UX 3 unless your PHP version and root constraints allow it. Use composer why symfony/ux-turbo if the resolved version surprises you.
  • UX 3 requires PHP >= 8.4. On PHP 8.3 Composer will keep resolving UX 2. That is expected and supported; do not fight the resolver.
  • Symfony Flex constrains Symfony core packages, not UX. Pin UX explicitly in CI or in your root constraints when you need reproducibility.
  • Debugging missing toasts: confirm the response is actually a Turbo Stream response with the correct content type, confirm the target container ID exists in the DOM, confirm the Stimulus controller is connected, and check whether the stream action is append versus update. Check the browser console for Turbo/Stimulus errors.
  • v0.4.0 has no public API, configuration key, template, or Stimulus identifier changes. Upgrading from v0.3.0 is effectively a no-op; no migration is required.
  • Extension points remain the bundle’s Twig template and Stimulus controller. Override the template through standard Symfony bundle override paths, and keep the Stimulus identifier stable unless you also update the DOM.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
novasa/laravel-language-center
opencage/geocode
adolfoholzer/parameters
livenetworks/ln-starter
shitoudev/permissionmanager
johannesclimacus/laravel-tui
hocvt/seotools
vitalybaev/sypexgeo
amphibee/themosis-ignition
gito-me/fast-excel
frankyso/laravel-ipaymu
geolize-studio/laravel-chile
boomerangui/chat
cgv/localized-resource
noith/settings
kda/laravel-package
kda/filament-dynamic-navigation
bypersoft/signbox
pairus/product-data
fayne/laravel-filament-cms-core