From 7fc124110bdbaa2682723be2a07bd81ca487943e Mon Sep 17 00:00:00 2001 From: Steve Date: Mon, 23 Dec 2024 17:40:14 +0700 Subject: [PATCH 1/2] update to be compatible with nova 5 --- src/Fields/Media.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Fields/Media.php b/src/Fields/Media.php index b393600e..49c69a22 100644 --- a/src/Fields/Media.php +++ b/src/Fields/Media.php @@ -217,10 +217,10 @@ private function removeDeletedMedia($data, Collection $medias): Collection } /** - * @param HasMedia|HasMediaTrait $resource + * @param HasMedia|InteractsWithMedia $resource * @param null $attribute */ - public function resolve($resource, $attribute = null) + public function resolve($resource, ?string $attribute = null): void { $collectionName = $attribute ?? $this->attribute; From 661ae32b077f093b5361b25f58567690cb5df431 Mon Sep 17 00:00:00 2001 From: Steve Date: Mon, 23 Dec 2024 17:41:11 +0700 Subject: [PATCH 2/2] Update composer.json --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index b086711c..fd013b48 100644 --- a/composer.json +++ b/composer.json @@ -15,7 +15,7 @@ "require": { "php": ">=7.4", "laravel/framework": "^8.0|^9.0|^10.0|^11.0", - "laravel/nova": "^4.0", + "laravel/nova": "^4.0|^5.0", "spatie/laravel-medialibrary": "^8.0|^9.0|^10.0|^11.0" }, "autoload": {