Answer the question
In order to leave comments, you need to log in
How to insert php laravel loop in Vue?
Hello everyone, please tell me how can I insert a loop in the form (php laravel) in Vue. I need to pass the data from the loop to vue so that the data from the loop is displayed in the dropdown list
@foreach ($regions as $current)
@if($current->parent_id)
<li>
<a href="{{ route('cabinet', [$category, $current]) }}">{{ $current->name }}</a>
</li>
@endif
@endforeach
<div id="app">
<h1>Vue Select</h1>
<v-select :options="options"></v-select>
</div>
new Vue({
el: '#app',
data: {
options: [
1,4,5,11
]
}
})
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question