Thanks, I've made this mistake before, and here is why.
My approach (the wrong one)
<form action="/table" method="get">
<select>
@foreach($posts->all() as $post)
<option name="year" value="{{ $post->date->year }}">{{ $post->date->year }}</option>
@endforeach
</select>
<button type="submit">Submit</button>
</form>
When I use foreach, it seems that the option is only one input, and that is why I include the name attribute inside option element instead of the select attribute.
As you mentioned, this is the accurate approach
<form action="/table" method="get">
<select name="year" >
@foreach($posts->all() as $post)
<option value="{{ $post->date->year }}">{{ $post->date->year }}</option>
@endforeach
</select>
<button type="submit">Submit</button>
</form>
Thanks, I was trying all sort of approaches.