我有以下字段
plan:
label: Plan
tab: account
type: relation
required: true
placeholder: Select Plan
emptyOption: No Plan Selected
business:
label: Select Business
tab: account
type: dropdown
required: true
placeholder: Select Business
options: getBusinessOptions
trigger:
action: show
field: plan
condition: value[1]
对应的计划关系为
public $belongsToMany = [
'plan' =>[
'MyPlugin\Plans\Models\Plans',
'table' => 'cls_useraccount_subscription',
'key'=>'user_id',
'otherKey' => 'plan_id',
],
];
我只需要在 plan 为 1 时显示业务领域,但它与 belongsTo 计划关系一起工作正常,我需要让它与 belongsToMany 关系一起工作。
提前致谢。