Support the ongoing development of Laravel.io →
Queues Laravel

Hey, everyone. I have a notification that I send it via broadcast. the notification receives successfully in pusher debug dashboard but It won't show in my application :/ what should I do?

these are my codes:

this what I get in pusher debug dashboard

{
  "status": "success",
  "message": "New Follower!",
  "id": "44392cfc-c301-4918-aa9f-4a47bd842615",
  "type": "App\\Notifications\\followerNotification"
}

and this is my code in javascript

import Echo from 'laravel-echo';

window.Pusher = require('pusher-js');

window.Echo = new Echo({
    broadcaster: 'pusher',
    key: '79a928f83a619e81a5ad',
    cluster: 'ap2',
    encrypted: true,
    namespace: 'App'
});
Echo.private('App.User.' + this.userId)
                .notification( (notification) => {
                    console.log(notification);
                });

this code is not going to show me anything when I send notifications :(

Last updated 3 years ago.
0

Sign in to participate in this thread!

PHPverse

Your banner here too?

Mohsen mohsenbostan Joined 1 Nov 2019

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.