There is a list of posts and two button to get the authors of posts as:
$posts = from laravel function => $posts = Post::all();
Post model has 2 columns : name, author.
<div x-data={ posts: {{ $posts }} }>
<button @click=" ... show the posts where author is A">A Authors</button>
<button @clik="... show posts where author is B">B Authors</button>
<template x-for='(post, index) in posts' :key='index'>
<div>
<h3 x-text="post.name"></h3>
<p x-text="post.author"></p>
</div>
</template>
</div>
How I can click on A Authors and B Authors and get the author where A or B?