I have a form in blade template. iF I submit the form I would like to pass id variable to vue component. How can I do it. Please help. Below my code.
<table>
@foreach($zam as $z)
<tr>
<td>{{$z->id}}</td>
<td>{{$z->name}}</td>
<td>{{$z->status}}</td>
<td>{{$z->getUser->name}}</td>
<td>
<form method="POST" action="{{route('mod_zam')}}">
@csrf
<select name="status">
<option value="przyjete"> przyjete</option>
<option value="realizowane"> realizowane</option>
<option value="wyslane"> wyslane</option>
</select>
<input type="hidden" name="id" value="{{$z->id}}" />
<input type="submit" name="modyf" />
</form>
</td>
</tr>
@endforeach
</table>
<ex id=???></ex>
I'm considering doing this in my blade:
const app = new Vue({
el: '#app',
data: {
},
});
But it's not working in blade. My second question - is it possible to create vue instance directly in blade, not via component?