Broadcast a notification to a Vue page

Add broadcast to via() only after the Reverb page is in place. Do not open a second Echo client.

For your AI agent

Copies a prompt. Paste it into the AI agent you already have open.

Read https://laravel-vuejs.space/laravel-broadcast-notification-vue.md
Add broadcast to via() only after the Reverb page is in place. Do not open a second Echo client.
Do not open a second Echo client.
Do not skip the database channel because the socket "felt instant".
Do not broadcast the full user model.
Show the diff. Do not commit.
On this page · 3 sections
  1. The fix
  2. What to avoid
  3. FAQ

People searching “Laravel broadcast notification Vue” add a second Echo connection beside the one the kit has. The Reverb guide subscribes with useEchoPublic. The notifications guide is the database bell. A broadcast channel is a third delivery of the same notification, not a second app.

TL;DR

  • Add broadcast to via() only after the Reverb page is in place.
  • Do not open a second Echo client.
  • Do not skip the database channel because the socket “felt instant”.
  • Do not broadcast the full user model.

Who it's for: Laravel + Vue developers

Applies to: Laravel 13 · Vue 3

The fix#

php
public function via(object $notifiable): array
{
    return ['database', 'broadcast'];
}

The database row is the thing the page can still show after a reload. The broadcast is the nudge. If the socket is down, the bell still works on the next visit.

What to avoid#

Gotcha

Do not skip the database channel because the socket “felt instant”. A missed socket message is gone. Do not broadcast the full user model. Broadcast the sentence and the id. Private channels, when you need them, are authorized in routes/channels.php the way the Reverb guide describes. This page does not add a new channel.

FAQ#

How do I broadcast a notification to a Vue page?

Add broadcast to via() only after the Reverb page is in place. Do not open a second Echo client.

What goes wrong with Laravel broadcast notification Vue?

Many developers add a second Echo connection beside the one the kit has. Do not skip the database channel because the socket "felt instant".

Found this useful?

Ask questions, share what you built.

Join thousands of Laravel and Vue developers in our Facebook group, or get new posts in your Telegram feed. Sharing this article helps too.

Keep reading

Newsletter

Get the best of Laravel & Vue, once a month.

One short email with new guides, release notes worth reading and hand-picked community links. No spam, unsubscribe any time.