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

JsonSerialize method not compatible #122

Open
ideal1sm opened this issue Mar 22, 2023 · 1 comment
Open

JsonSerialize method not compatible #122

ideal1sm opened this issue Mar 22, 2023 · 1 comment

Comments

@ideal1sm
Copy link

Hello, today I installed the package and got an error

image

Declaration of Benjacho\BelongsToManyField\BelongsToManyField::jsonSerialize() must be compatible with Laravel\Nova\Fields\Field::jsonSerialize(): array

I solved this problem by adding to the jsonSerialize method of the BelongsToManyField class, return type of array

public function jsonSerialize(): array

@DzonyBB
Copy link

DzonyBB commented Nov 16, 2023

Yes, the error is gone, but the problem is not solved. Now there is no error, but it does not display any data. Help me set it up, thank you.

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