-
Notifications
You must be signed in to change notification settings - Fork 197
Closed
Description
- Echo Version: 1.8.0
- Laravel Version: 7.0
- PHP Version: 7.2.
- NPM Version: 6.12.1
- Node Version: 12.13.1
Description: I'm trying to send notifications to users,
My pusher connection is good because it sends on public channels
And also, i get this message on my console
[2020-07-24 21:08:09][355] Processed: Illuminate\Notifications\Events\BroadcastNotificationCreated
and on pusher i also see that the message was sent.
I also don't get any errors on my browser console as all the websocket connections are working well.
But i still dont get any messages.
I tried
Echo.private('App.User.' +userId)
.notification((notification) => {
console.log(notification);
});
I also tried
Echo.private('App.User.' + userId)
.listen('.Illuminate\\Notifications\\Events\\BroadcastNotificationCreated', (e) => {
console.log('Event Notification received ', e)
});
I also followed many tutorials and the docs
All to no avail.
Steps To Reproduce:
Create a notification and declare both the toArray method and toBroadcast methods but echo fails to catch messages from pusher
Activity
driesvints commentedon Jul 25, 2020
Hi there,
Thanks for reporting but it looks like this is a question which can be asked on a support channel. Please only use this issue tracker for reporting bugs with the library itself. If you have a question on how to use functionality provided by this repo you can try one of the following channels:
However, this issue will not be locked and everyone is still free to discuss solutions to your problem!
Thanks.
Myestery commentedon Aug 7, 2020
I finally solved this issue myself
Steps
In my bootstrap.js file
Then in my routes/api.php file,
There is more info on this in the documentation,
I hope it helps someone someday
parallels999 commentedon Aug 26, 2022
@Myestery on next version you can use
bearerToken
optionMyestery commentedon Aug 26, 2022
Thanks