I\'m making a shopping cart system with Laravel and Vue. When I add an item to the basket, I display a confirmation message by toggling a Vue variable being watched by a v-if:>
It is likely a scope issue. Try the following instead:
addToBasket: function(){ item = this.photo; this.$http.post('/api/buy/addToBasket', item); this.basketAddSuccess = true; var self = this; setTimeout(function(){ self.basketAddSuccess = false; }, 2000); }