I had this working previously but after a few composer updates I'm now getting Vue related errors.
I"m doing a character countdown so in my HTML I have:
<div>Characters remaining:</div><div class="input-group-addon" v-text="{{remainingCount}}"></div>
And in my Vue code I have:
new Vue({
el: '#postContent',
data: {
maxCount: 1400,
remainingCount: 1400,
message: '',
hasError: false
},
methods: {
countdown: function() {
this.remainingCount = this.maxCount - this.message.length;
this.hasError = this.remainingCount < 0;
}
}
})
But when I load my page I get the error: Use of undefined constant remainingCount - assumed 'remainingCount' in the line of html above.
I'm not sure what change would have caused this but does it look like I'm doing something wrong in terms of laravel's understanding of the Vue syntax?
Update: This has been marked as a duplicate, or answered, but the answer referenced doesn't help. if I make it v-text="@{{remainingCount}}" then the error goes away but now my #postContent area from my Vue code is gone
remainingCountis only vue variable. Why are you wrapping it into{{ }}? Why not use onlyv-text="remainingCount"? Or<div>{{remainingCount}}</div>.