I have a simple Vue instance and want to pass json from the backend to vue without HTTP request because it\'s always the same.
I\'ve tried do this with props, but it
Your solution was nearly there but you don't need a prop, rather use a data attribute and assign the JSON via a method:
new Vue({
el: '#app',
data: {
json: {},
},
methods: {
setJson (payload) {
this.json = payload
},
}
})
{{ json }}
You would just assign your Laravel data to the setJson methods payload, i.e.
:json="setJson({{ $prices }})