【发布时间】:2021-06-15 05:04:50
【问题描述】:
我需要创建一个操作以将一些资产克隆到新组织。我想为管理员用户提供选择资产,然后选择一个组织并运行操作以转移资产。但我们有一长串资产和组织。所以整个挂断了,因为它试图加载每个资产的所有组织列表。有没有办法在 Nova 动作中设置可搜索选项?
$organizations = resolve('App\Repository\OrganizationRepository\OrganizationRepositoryInterface')->getAll()->pluck('company_name', 'id');
return [
Select::make('Organization', 'id')->rules('required', 'exists:organizations,id')->options($organizations)
];
【问题讨论】:
标签: laravel-nova