Open Saberqadimi opened 2 years ago
Hello Have you found the solution? I am stuck with the same problem for days. Could you share the code here on github,if you have solved the issue.
No, unfortunately, my problem was not solved. These codes work in other Laravel programs, but they do not work in this project
On Sat, Sep 10, 2022, 23:33 KhalidHimmi @.***> wrote:
Hello Have you found the solution? I am stuck with the same problem for days. Could you share the code here on github,if you have solved the issue.
— Reply to this email directly, view it on GitHub https://github.com/tlaverdure/laravel-echo-server/issues/599#issuecomment-1242789379, or unsubscribe https://github.com/notifications/unsubscribe-auth/AT2PNVFZXMY6CGWKDRBSM4DV5TLOPANCNFSM56PVRSDA . You are receiving this because you authored the thread.Message ID: @.***>
Good time, for the implementation of the chat room, I have done all the Pusher configurations correctly, and sending messages and displaying online users works correctly, but the event in the .listen method does not work, and it does not even log. Thank you for your help. I have been dealing with this problem for a long time. I hit this is my event `class MessageSended implements ShouldBroadcast { use Dispatchable, InteractsWithSockets;
}`
and in echo.js
`import Bus from './bus' window.Echo.join('chat')
.listen('.MessageSended', (e) => { console.log(e); // Bus.$emit('message.added', e.message) }) `
and this Channel Broadcast::channel('chat', function ($user){ return [ 'id' => $user->id, 'name'=> $user->name ];
}); `
and this message controller ` public function store(Request $request) {