Skip to content
Advertisement

Websocket chat in Laravel isnt real time

I am creating a chat in Laravel Websocket i followed a youtube tutorial and the message goes to the other user they can talk with each other but i need to reload the page to get the message that was sent,its not real time.At the console before i send a message it says this error: Failed to load resource: the server responded with a status of 404 (Not Found) and than after sending says this POST http://127.0.0.1:8000/broadcasting/auth 404 (Not Found) .I have run “php artisan websocket:serve” command in terminal.Thanks in advance

ChatsController.php

JavaScript

User.php

JavaScript

Message.php

JavaScript

web.php

JavaScript

ChatsComponent.vue

JavaScript

MessageSent.php

JavaScript

Advertisement

Answer

Sorry to post this as an answer, but you need 50 reputation to place a comment. Did you uncomment the AppProvidersBroadcastServiceProvider::class, line in your config/app.php?

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement