Skip to content
This repository has been archived by the owner on Apr 28, 2022. It is now read-only.

Event Action Messages not delivering. #5

Open
hayjay opened this issue Aug 17, 2018 · 3 comments
Open

Event Action Messages not delivering. #5

hayjay opened this issue Aug 17, 2018 · 3 comments

Comments

@hayjay
Copy link

hayjay commented Aug 17, 2018

When the /test route is been clicked the necessary navbar notification isn't popping up on the other browser tab. You may need to use laravel Echo to fix or npm to require pusher it self.

@kodunmi
Copy link

kodunmi commented Dec 13, 2019

I got it working

in your .env file change
from log
BROADCAST_DRIVER=log

to pusher
BROADCAST_DRIVER=pusher

add
'Pusher' => Pusher\Pusher::class,
to your app config aliases

Add to MyEvent event

public function broadcastAs() { return '//name of your even goes here eg: my-event'; }

In the welcome.blade.php add the return of the broadcastAs method eg: my-event to the channel.bind method

channel.bind('my-event', function(data) {......

After this it should work

@hayjay
Copy link
Author

hayjay commented Dec 16, 2019

Ok great thanks!

I will try it out!

@yudium
Copy link

yudium commented Jan 22, 2020

I follow @kodunmi but still not working. Then I open config/broadcasting.php and change following setting
'default' => env('BROADCAST_DRIVER', 'null')
to
'default' => "pusher"

and it's working.

It is like laravel didn't read my .env file.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants