Hi,
is it not possible to get the options for a select field from a custom Panel API route. I can’t make this work:
Blueprint:
option:
label: Filter option
type: select
options: api
api:
url: "{{ site.url }}/api/filterOptions"
text: "{{ item.name }}"
value: "{{ item.slug }}"
Route in the plugin:
'api' => [
'routes' => [
[
'pattern' => 'filterOptions',
'action' => function() {
return [
[
'name' => 'Name 1',
'slug' => 'slug 1'
],
[
'name' => 'Name 2',
'slug' => 'slug 2'
],
[
'name' => 'Name 3',
'slug' => 'slug 3'
],
];
}
]
]
],
What am I missing here?
Thank you,
Georg