[Vuejs]-How to change upvotes and downvotes directly in databes with vue.js?

0๐Ÿ‘

  1. VueJS is frontend framework so you are not able to use it to manipulate DB.
  2. Create 2 routes with actions e.g. /api/vote/up/{id} and /api/vote/down/{id}
  3. In your component you need some id of your item (article,review etc?).
    4.Use e.g. Axios to create getrequests like `Vue.axios.get(โ€˜/api/vote/down/โ€™+ this.objectID).
  4. Utilize Laravel to handle up/down voting

Leave a comment