I am able to remove events from their state with Vuex ORM with the following from a .vue file:
...
<tr v-for="event in events"
...
<i class="fa fa-trash-o" @click="destroyEvent(event)"></i>
</tr>
export default {
methods: {
destroyEvent(event) {
EventsModel.delete(event.id)
}
}
}
But this only removes it from its state, so when i reload the page, the events come back. How can I remove them from the server as well as the state with Vuex ORM?
Solved with EventsModel.delete(url_path, option)