symfony/ux-notify
symfony/ux-notify provides a simple notification system for Symfony apps, letting you send user-facing alerts from PHP and display them in the browser through Symfony UX. It integrates with Symfony Notifier and offers straightforward setup for consistent, real-time notifications.
v3.6.0 is a maintenance/feature release of symfony/ux-notify — a Symfony UX package, not a Laravel package. Nothing here is Laravel-native, so the first decision is whether Mercure/SSE is worth it versus Laravel's first-class broadcasting stack (Reverb/Pusher + Echo).
composer require symfony/ux-notify; JS side npm i @symfony/ux-notify.Symfony\UX\Notify\NotifierInterface::send(string $topic, array $payload) and the @symfony/ux-notify JS export createNotificationStream()./users/42) after an order ships, replacing a polling endpoint.Hub instance.$notifier->send('/users/42', ['type' => 'order_shipped', 'order' => 123]); Topic is a Mercure topic IRI, payload is JSON-serializable.const stream = createNotificationStream(hubUrl, { topics: ['/users/42'] }); stream.onmessage = e => handle(JSON.parse(e.data));NotifierInterface in a service provider; either pull symfony/mercure's Hub or skip the Symfony stack entirely and publish with Laravel's Http client to /.well-known/mercure using a publisher JWT cookie/header. The latter is fewer dependencies and easier to test.ShouldQueue) or wrap in DB::afterCommit() so subscribers never receive notifications for rolled-back transactions./users/{id}), per-tenant (/tenants/{id}), and per-resource topics; keep payloads thin and let the client re-fetch authoritative data.mercure.publish; subscriber JWT carries mercure.subscribe with topic patterns. Generate with lcobucci/jwt or Symfony's Mercure JWT factory; keep publisher secrets server-side only.createNotificationStream is isolated and won't conflict.symfony/mercure is unaffected by these constraints.symfony/asset-mapper >= 8.2 (bug #3919). Irrelevant unless you also run the Symfony bundle with AssetMapper; don't try to co-install in one app.X.Y.Z placeholder (#3907). If you copy a composer require / npm i line from the docs, pin the real version yourself — the literal X.Y.Z will fail./users/42 ≠ /users/42/ ≠ users/42. A 401/406 in the browser Network tab usually means JWT claim/topic mismatch, not a code bug.curl -d 'topic=/users/42' -d 'data={"ping":1}' <hub>/.well-known/mercure isolates server publishing from client subscription.createNotificationStream accepts a custom EventSource factory — use it for reconnect/backoff and heartbeat tuning rather than forking the package.How can I help you explore Laravel packages today?