[Vuejs]-Laravel echo vue websocket https

0👍

i have the same problem.
this is my code
i use laravel echo library

import Vue from 'vue'        
import VueEcho from 'vue-echo-laravel';



  Vue.use(VueEcho, {
                broadcaster: 'socket.io',
                host: "http://192.168.21.100:6001,
            });
            this.$echo.channel('messages').listen('.newMessage', (payload) => {
                console.log("messages ", payload);
               
            });

insert this line to index.html

<script src="http://192.168.21.100:6001:socket.io/socket.io.js"></script>

Leave a comment