I'm setting up a new website and I'd like to send data from the Laravel blade template to the Vue.js front end.
I've tried passing the php property into an html proprerty I can access from vue and this works with simple strings.
<div id="paragraphs" originaldata="{!! $band->paragraphs !!}">
...
mounted: function() {
this.paragraphs = this.$el.attributes.originaldata.value.split('//')
this.paragraphs.push('')
}
This does not with strings containing double quotes or html tags. I have tried binding to a prop using single quoted json_encoded data however this output breaks the prop-parsing in the browser and leaves bits of html and data scattered in the DOM.