Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- methods:{
- send(){
- if(this.message.length != 0)
- {
- this.chat.message.push(this.message);
- axios.post('admin/send', {
- message : this.message
- })
- .then(response => {
- // console.log(response);
- this.message = '';
- })
- .catch(error => {
- // console.log(error);
- });
- }
- }
- }, mounted(){
- Echo.private('chat')
- .listen('ChatEvent', (e) => {
- //this.chat.message.push(e.message);
- console.log(e);
- });
- }
Add Comment
Please, Sign In to add comment