in laravel i have ProdoctController and CategoryController, im passing the category data with this function:
public function view(){
$category = Category::all();
return view('admin.product.main',['category'=>$category]);
}
its working with normal mode in laravel:
<select>
@foreach(category as categories)
<option value='{{category->id}}">{{category->name}}</option>
@endforeach
</select>
but in vue js i have a categories:[] in data, and i want to use this:
<select v-model="ProductCategory">
<option v-for="category in categories" :value="categories.id">categories.name</option>
</select>
how can i pass the data in categories array?