title: VueDraggable send request to DB while drag and drop
body: <p>I need a help for vuedraggable component. I have three columns. (Photo inserted) I want to drag BoardUserCard between columns and want to send PUT request to database for changing &quot;lead_status_id&quot; related to column dropped. How can I achieve this ? I can not find any example about apis in documentation.
  <a href="https://i.stack.imgur.com/sneeT.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/sneeT.png" alt="enter image description here" /></a></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>&lt;template&gt;
    &lt;div class="board"&gt;
      &lt;div class="boards"&gt;
        &lt;div class="boards-cards leads"&gt;
          &lt;div class="board-card-header "&gt;
            &lt;h3&gt;
              Leads
            &lt;/h3&gt;
            &lt;span&gt;
              {{ allLeads.length }}
            &lt;/span&gt;
          &lt;/div&gt;
          &lt;draggable
            ghost-class="ghost"
            :list="allLeads"
            class="board-card-body"
            :options = "{group:allLeads}"
            group="leads"
            @change="handleChange"
          &gt;
            &lt;BoardUserCard
              v-for="item in allLeads"
              :key="item.name"
              :name="item.name"
              :email="item.email"
              :img="item.img"
              :status="item.status"
            /&gt;
          &lt;/draggable&gt;
        &lt;/div&gt;
        &lt;div class="boards-cards contacted"&gt;
          &lt;div class="board-card-header "&gt;
            &lt;h3&gt;
              Contacted
            &lt;/h3&gt;
            &lt;span&gt;
              {{ contactedLeads.length }}
            &lt;/span&gt;
          &lt;/div&gt;
          &lt;draggable
            ghost-class="ghost"
            :list="contactedLeads"
            class="board-card-body"
            :options = "{group:contactedLeads}"
            group="leads"
            @change="handleChange"
          &gt;
            &lt;BoardUserCard
              v-for="item in contactedLeads"
              :key="item.name"
              :name="item.name"
              :email="item.email"
              :img="item.img"
              :status="item.status"
            /&gt;
          &lt;/draggable&gt;
        &lt;/div&gt;
        &lt;div class="boards-cards converted"&gt;
          &lt;div class="board-card-header "&gt;
            &lt;h3&gt;
              Converted
            &lt;/h3&gt;
            &lt;span&gt;
              {{ convertedLeads.length }}
            &lt;/span&gt;
          &lt;/div&gt;
          &lt;draggable
            ghost-class="ghost"
            :list="convertedLeads"
            class="board-card-body"
            :options = "{group:convertedLeads}"
            group="leads"
            @change="handleChange"
          &gt;
            &lt;BoardUserCard
              v-for="item in convertedLeads"
              :key="item.name"
              :name="item.name"
              :email="item.email"
              :img="item.img"
              :status="item.status"
            /&gt;
          &lt;/draggable&gt;
        &lt;/div&gt;
      &lt;/div&gt;
  
  
  
    &lt;/div&gt;
  &lt;/template&gt;
  
  &lt;script&gt;
  import BoardUserCard from "@/components/BoardUserCard.vue";
  import draggable from "vuedraggable";
  
  export default {
    name: "Dashboard",
    components: {
      BoardUserCard,
      draggable,
    },
    data() {
      return {
        showModal: false,
        allLeads: [
          {
            name: "Richard",
            email: "Richard@gmail.com",
            img: "avatar-small.svg",
            status: "all"
          },
          { name: "Rachael", email: "Rachael@gmail.com", img: "leads.svg", status: "all" },
          { name: "Matt", email: "Matt@gmail.com", img: "user-avatar.svg",status: "all" },
          { name: "Brad", email: "Brad@gmail.com", img: "leads.svg", status: "all"},
        ],
        contactedLeads: [
          {
            name: "Jeniffer",
            email: "Jeniffer@gmail.com",
            img: "avatar-small.svg",
            status: "contacted"
          },
        ],
        convertedLeads: [
          { name: "Mike", email: "Mike@gmail.com", img: "leads.svg", status: "converted" },
        ],
  
      };
    },
    methods: {
      openModal() {
        this.showModal = true;
      },
      closeModal() {
        this.showModal = false;
      },
      handleChange(event){
        console.log(event)
      }
    },
  };
  &lt;/script&gt;</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.5.17/vue.js"&gt;&lt;/script&gt;</code></pre>
  </div>
  </div>
  </p>