-
Notifications
You must be signed in to change notification settings - Fork 196
Closed
Description
I've gone through the following steps:
- I created a new project with laravel 5.8;
- I have modified the values of the
BROADCAST_DRIVER
andQUEUE_DRIVER
entries in my .env toredis
; - I created a new channel route in the
routes/channel.php
file with the nametest-asd
; - I created a new event with the name
MessageSent
; - In the
broadcastOn
method I added: `return new Channel ('test-asd'); - I created a test route in the
routes/web.php
file with the name test, and added a callback:broadcast(new MessageSent ())
; - I installed
laravel-echo-server
globally; - I installed the depencences with
npm install
; - I installed
laravel-echo
withnpm install laravel-echo
- I installed
predis/predis
withcomposer require predis/predis
- I modified the
resources /js/bootstrap.js
file by importingsocket.io-client
and pointingsocket.io
as broadcaster; - I've added a listener to the Echo in my TestComponent.vue:
Echo.channel('test-asd').listen ('MessageSent', (e) => {}
; - I started the redis-server, the laravel-echo-server, the artisan serve and the queue:listen;
- testing...
Okay, there were a lot of steps, but by taking the test I do not get any feedback from my listener. I noticed that in the laravel-echo-server
console, it returns the channel as laravel_database_test-asd.
So I changed the listener channel in my component from channel ('test-asd')
to channel ('laravel_database_test-asd')
and it works normally.
So my question is: Why is laravel creating a channel with the prefix laravel_database_
?
Metadata
Metadata
Assignees
Labels
No labels