Здравствуйте подскажите пожалуйста, как во Vue select осуществить поиск по двум столбцам? Он ищет по столбцу "name", а нужно ещё по столбцу "branche"
<template>
<el-select style="width: 100%" id="date_for_dogovors" v-model="selected_posts_list" clearable filterable placeholder="Выбрать">
<el-option
size="small"
v-for="factorVal in posts_lists"
:key="factorVal.id"
:label="factorVal.name"
:value="factorVal.name"
/>
</el-select>
</template>
<script>
export default {
name: "Post_lists",
data() {
return {
posts_lists: [],
selected_posts_list: null
}
},
mounted() {
this.getPoluhenie();
},
methods: {
getPoluhenie() {
axios.get('/api/posts_lists')
.then(res => {
this.posts_lists = res.data;
this.$emit('getPosts', res.data);
})
.catch(error => {
console.error(error);
});
}
}
}
</script>
<style scoped>
</style>
Контроллер
{
public function index() {
$items = Post::all();
return response()->json($items);
}
}