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
I understand that need to use a different method, but do not use it correctly
MediaCannotBeDeleted :: doesNotBelongToModel which throws out a fatal error
The example: I try to delete media not related to the model.
This code (https://github.com/spatie/laravel-medialibrary/blob/master/src/HasMedia/HasMediaTrait.php#L376) return null.
So this row https://github.com/spatie/laravel-medialibrary/blob/master/src/HasMedia/HasMediaTrait.php#L379 return the fatal error because $media are not declared as Spatie\MediaLibrary\Media
The text was updated successfully, but these errors were encountered: