You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You've succesfully updated your package to no longer have the collision with this function, by renaming GetMediaModel in your HasMediaLibrary Concern. But this function still calls GetMediaModel on the Layout class, while this function name can no longer be used in this context, because it expects a String as return, while it should return a HasMedia instance.
if you update getMediaModel to for example:
$model = $model->getCustomMediaModel();
and then in the Layout class:
public function getCustomMediaModel()
{
return $this->model;
}
it doesn't throw errors in the front anymore, but I know get another error in the nova admin
Call to a member function getMedia() on null
edit: this error in Nova was fixed by applying this #515 (comment)
The text was updated successfully, but these errors were encountered:
Due to the change in Spatie Medialibrary https://github.com/spatie/laravel-medialibrary/releases/tag/11.4.3 where the GetMediaModel function is added on the HasMedia trait, this package is no longer compatible with it.
You've succesfully updated your package to no longer have the collision with this function, by renaming GetMediaModel in your HasMediaLibrary Concern. But this function still calls GetMediaModel on the Layout class, while this function name can no longer be used in this context, because it expects a
String
as return, while it should return a HasMedia instance.if you update getMediaModel to for example:
$model = $model->getCustomMediaModel();
and then in the Layout class:
it doesn't throw errors in the front anymore, but I know get another error in the nova admin
Call to a member function getMedia() on null
edit: this error in Nova was fixed by applying this #515 (comment)
The text was updated successfully, but these errors were encountered: