Category: Laravel

For a project that I am currently working on, I am creating a chat application within a single page Vue application with a Laravel backend, and then I ran into this problem. I ran into an issue where as I would have users disconnect and reconnect to the chat instance (aka the Echo listeners), they would hear the same event multiple times.

Simply disconnect() and then re-instantiate the Echo object.

Then simply re-attach your listeners and you are good. In my case, I simply created a new Echo instance that I could destroy and re-create as needed for my chat application.
Newsletter

Get the latest Laravel/PHP jobs, events and curated articles straight to your inbox, once a week

Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future. Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future.
Community Partners