4 months ago

Update the notifications counter and dropdown items with pusher

Posted 4 months ago by Giorgiovski

I implemented a simple notifications system in Laravel 6. Now I'm trying to migrate to real-time notifications, I mean when a new notification is there to change the bell counter(unread notifications) and update the dropdown items. How can I update the counter(badge) and update this dropdown without refresh the page?

Now just I displaying the results in console:

My app.js to update in real-time with Laravel-echo

Echo.private('App.User.' + userId)
    .notification((notification) => {

Thank you.

Please sign in or create an account to participate in this conversation.