title: Laravel echo listen readed message
body: <p>How I can listen, if message seen by user?</p>
  
  <p>I have code:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>    watch: {
      message() {
          Echo.private('chat')
              .whisper('typing', {
                  name: this.message
              });
      }
  },
  methods: {
      send(){
          if(this.message.length != 0 &amp;&amp; this.message.length &lt;= 4000) {
              this.chat.message.push(this.message);
              this.chat.user.push('you');
              this.chat.time.push(this.getTime());
              axios.post('/sendMessage', {
                  message: this.message,
                  //lastName: 'Flintstone'
                })
                .then(response =&gt; {
                  console.log(response);
                  this.message = '';
                })
                .catch(error =&gt; {
                  console.log(error);
                });
          }
      },
      getTime() {
          let time = new Date();
          return time.getHours() + ':' + time.getMinutes();
      }
  },
  
  mounted() {
      Echo.private('chat')
          .listen('ChatEvent', (e) =&gt; {
              this.chat.message.push(e.message);
              this.chat.user.push(e.user);
              this.chat.time.push(this.getTime());
              console.log(e);
          })
          .listenForWhisper('typing', (e) =&gt; {
              if(e.name != '')
                  this.typing = 'typing..';
              else
                  this.typing = null;
          });
  }</code></pre>
  </div>
  </div>
  </p>
  
  <p>I updated:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code> methods: {
          seenMessage() {
              axios.post('/setMessagesSeen/' + this.convId)
              .then( response =&gt; { this.chat.seen = ''; }) 
              .catch( response =&gt; { console.log(response) } )
          },
          send(){
              if(this.message.length != 0 &amp;&amp; this.message.length &lt;= 4000) {
                  this.chat.message.push(this.message);
                  this.chat.user.push(this.user);
                  this.chat.time.push(this.getTime());
                  this.chat.seen.push('unread');
                  axios.post('/sendMessage/' + this.convId, {
                      message: this.message,
                    })
                    .then(response =&gt; {
                      console.log(response);
                      this.message = '';
                    })
                    .catch(error =&gt; {
                      console.log(error);
                    });
              }
          },
          getTime() {
              let time = new Date();
              return time.getHours() + ':' + time.getMinutes();
          }
      },</code></pre>
  </div>
  </div>
  </p>
  
  <p>How I can send class "unread" to element div other user? I can paste class on current user, and I get color on element chat only for me, but how I can hide element for me and other user, when message is seen?</p>
  
  <hr>
  
  <p>I can watch, if message typing. But How I can listen if message seen by user? I need do actions, if message sended for seen message or how?</p>