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

Undefined type 'Nikaia\Rating\Rating' #31

Open
pit07 opened this issue Dec 20, 2021 · 0 comments
Open

Undefined type 'Nikaia\Rating\Rating' #31

pit07 opened this issue Dec 20, 2021 · 0 comments

Comments

@pit07
Copy link

pit07 commented Dec 20, 2021

Hi!

After a

composer require nikaia/nova-rating-field

I added

use Nikaia\Rating\Rating;

Then,

public function fields(Request $request)
    {
        return [
            ID::make(__('ID'), 'id')->sortable(),
            BelongsTo::make('Enseigne', 'merchant', Merchant::class)->sortable(),
            Textarea::make('URL', 'url'),
            Text::make('Titre', 'title'),
            Textarea::make('Description', 'description'),
            Text::make('Prix', 'price'),
            Text::make('Image', 'image'),
            Rating::make('Rating', 'score')
                ->min(0)
                ->max(4)
                ->increment(1)
                ->sortable()
                ->withStyles([
                    'star-size' => 24,
                    'rounded-corners' => true
                ]),
        ];
    }

On Visual Studio Code, I have this issue:

Undefined type 'Nikaia\Rating\Rating'

It's working on local, but not in PROD (but no php error or warning...)
Any ideas?

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

1 participant