1

I Have the following fields

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]

And the corresponding plan relation is

   public $belongsToMany = [
    'plan' =>[
        'MyPlugin\Plans\Models\Plans',
        'table' => 'cls_useraccount_subscription',
        'key'=>'user_id',
        'otherKey' => 'plan_id',
    ],
];

I need to show business field only when plan is 1 , but it is working fine with belongsTo plan relation , My need is to make it work with belongsToMany relation.

Thanks in advance.

0 Answers0