To create WireUi selects it is necessary to format the data correctly, for this reason the official example has been extended to improve its potential.
Using 'simple' method you can add eloquent query or filter to optimize your API.
You can filter Laravel Collection with 'getFromCollection'
You can filter custom array with 'getFromArray' method like this:
public function example_from_array(Request $request)
{
$all_entries = [
0 => 'Version 1',
1 => 'Version 2',
];
return $this->getFromArray($request, $all_entries);
}