Declaration of Spatie jsonSerialize() must be compatible with Illuminate\Support\Collection::jsonSerialize(): array #2967
Unanswered
gundogduyakici
asked this question in
Q&A
Replies: 2 comments 3 replies
-
I'm facing this issue previously, then I upgrade the Laravel version and using the latest version laravel-medialibrary composer require laravel/framework:^9.4
composer require spatie/laravel-medialibrary:^10.4.0 |
Beta Was this translation helpful? Give feedback.
0 replies
-
It has the same return type, maybe you did have problems with instalation or with cache, try deletin spatie folder and composer update -W
|
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Symfony\Component\ErrorHandler\Error\FatalError
Declaration of Spatie\MediaLibrary\MediaCollections\Models\Collections\MediaCollection::jsonSerialize() must be compatible with Illuminate\Support\Collection::jsonSerialize(): array
C:\laragon\www\xxxx\vendor\spatie\laravel-medialibrary\src\MediaCollections\Models\Collections\MediaCollection .php : 51
Why am I getting this error?
My php version is 8.0
I use Laravel 9
Beta Was this translation helpful? Give feedback.
All reactions