1👍
That’s an example Broadcast Channel. check your channel is working or not.
Exmple of vue js listing Laravel Socket.
<tr v-for="(item,index) in desserts" :key="index">
<td>{{item.name}}</td>
</tr>
</template>
<script>
import { mapGetters } from "vuex";
export default {
props: ["item"],
data() {
return {
desserts: []
// array Decalare
};
},
mounted() {
this.listenForBroadcast(
{
channelName: "channelName",
eventName: "eventName"
},
({ data }) => {
this.desserts = data.data.stockData;
// store in desserts array
}
);
}
}
</script>
Source:stackexchange.com