Hidden value from vue not working.
The v-model of the one input its not working.
<template>
<form class="form-inline" type="POST" @submit.prevent="insertComment" role="form">
{{ csrf_field() }}
<div class="form-group">
<input class="form-control" type="text" name="text" v-model="newcomment.text" placeholder="Your comments" />
<input type="text" name="post_id" v-model="newcomment.post_id" value="@{{items.id}}" />
</div>
<div class="form-group">
<input type="submit" class="btn btn-default" value="Enviar">
</div>
</form>
</template>
v-model="newcomment.post_id" value is null.
How to fix this?
value="@{{items.id}}", it's probably interfering withv-model. The default value of the input should be set in the componentdata