I can't push data to users. But in console.log(e.user);
it has a data.
<template lang="html">
<div class="">
Users
<ul>
<li v-for="user in users"> </li>
</ul>
</div>
</template>
<script>
export default {
data() {
return {
users: [
{name: 'adadasd'},
{name: 'zxczxcxz'}
],
}
},
created() {
Echo.channel('user-login')
.listen('.App\\Events\\UserLogin', e => {
this.users.push(e.user);
console.log(e.user);
});
}
}
</script>
<style lang="css">
</style>
What happen?
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire