You can't do it that way as v-model
overrides the value
attribute on the input element. So probably the best option would be to add this straight to your script
tag.
<script type="text/javascript>
new Vue({
data: {
upload {
id: {{$in->id}}
}
}
});
</script>
Or, if you are initiating VueJS within it's own javascript file, instead of inline you could set it as a property on the window. For example, in your <head>
you can do the following:
<head>
...
<script type="text/javascript">
window.sharedData = window.sharedData || {};
window.sharedData.uploadId = {{$in->id}};
</script>
...
</head>
This means in your javascript file you could then do the following:
data: {
upload: {
in: window.sharedData.uploadId
}
}