select、multipleSelect从api中获取选项列表
$form->select($column[, $label])->options([1 => 'foo', 2 => 'bar', '...val' => 'Option name']);
或者从api中获取选项列表:
$form->select($column[, $label])->options('/api/users');
其中api...接口的格式必须为下面格式:
[
{
"id": 9,
"text": "xxx"
},
{
"id": 21,..., ['id', 'name as text']);
}
接口返回的数据结构为
{
"total": 4,
"per_page": 15,
"current_page": 1,..."last_page": 1,
"next_page_url": null,
"prev_page_url": null,
"from": 1,
"to": 3