title: How to passing props id into methods in vue js
body: <p>My project are using laravel as backend and vue as front end.
  I want to passing props id into methods.
  Then when i clicked button it will get the users id and running the continues process.</p>
  
  <p>in my view i using this to passing id to vue components.</p>
  
  <pre><code>&lt;conversation_send_message_form user_id="{{ $user-&gt;id }}"&gt;&lt;/conversation_send_message_form&gt;
  </code></pre>
  
  <p>After that this is my vue code</p>
  
  <pre><code>export default {
      data() {
          return {
              body: null,
              recipients: [],
          }
      },
      props: ['id'],
      methods: {
          ...mapActions([
              'sendMessage'
          ]),
          send(){
              this.sendMessage({
                  recipientIds: this.id,
                  body: this.body
              }).then(() =&gt;{
                  this.recipients= []
                  this.body = null
              })
          }
      }
  }
  </code></pre>
  
  <p>Here will receive the data and process it</p>
  
  <pre><code>sendMessage ({dispatch, commit}, {body, recipientIds}) {
      return api.storeMessage({
          body: body,
          recipientIds: recipientIds
      }).then((response) =&gt; {
          console.log(response)
      })
  },
  </code></pre>
  
  <p>My Api</p>
  
  <pre><code>storeMessage({body, recipientIds}){
      return new Promise((resolve, reject) =&gt; {
          axios.post('/webapi/conversations', {
              body: body,
              recipients: recipientIds
          }).then((response) =&gt;{
              resolve(response)
          })
      })
  },
  </code></pre>
  
  <p>In my scenario i need a new methods to get the props id and passing into the new methods "Send", inside it will passing the id into recipientIds, then the api will handle for it. But i had no idea how to get the props id. Anyone can help me?</p>