Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Method NovaConditionalFields\Condition::when does not exist. #13

Open
pit07 opened this issue May 4, 2022 · 1 comment
Open

Method NovaConditionalFields\Condition::when does not exist. #13

pit07 opened this issue May 4, 2022 · 1 comment

Comments

@pit07
Copy link

pit07 commented May 4, 2022

I installed this with composer.

In use:


use NovaConditionalFields\Condition;
Select::make('Type de code', 'type')
                ->options([
                    'personnal' => 'Code pour client unique',
                    'on_categories' => 'Réduction sur une ou plusieurs catégories',
                    'on_products' => 'Réduction sur un ou plusieurs produits',
                    'on_shipping' => 'Réduction sur les frais de port'
                ])->required(),

            Condition::make('type')
                ->fieldsWhen('personnal', [
                    Currency::make('Remise en €', 'discount_euro'),
                    Boolean::make('Frais de port offerts', 'shipping_offered')
                ])->when('on_categories', [

                ])->when('on_products', [

                ])->when('on_shipping', [
                    Boolean::make('Frais de port offerts', 'shipping_offered')
                ])

I have this message :

Method NovaConditionalFields\Condition::when does not exist...

@SebastianMueller87
Copy link

There is no function when() in NovaConditionalFields\Condition.

Just fieldsWhen and fieldsWhenNot.

https://github.com/dillingham/nova-conditional-fields/blob/master/src/Condition.php

Also the extended MergeValue-class does not contain a when function. I would assume the readme is not correct.

I would recommend to use this package as inspiration instead of using it.
The last release is from 2019 and the version is tagged with 0.0.1. The last code activity was three years ago. The Nova version was 1.3.1 when this package was published and also last updated. :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants