From 55066d30b1bedd5bb5cde750421b279477ad5269 Mon Sep 17 00:00:00 2001 From: Alexander Nikushkin Date: Wed, 6 Mar 2024 00:51:43 +0500 Subject: [PATCH] chore: remove resolvePreview --- src/Fields/MediaLibrary.php | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/src/Fields/MediaLibrary.php b/src/Fields/MediaLibrary.php index 18fe527..b900a32 100644 --- a/src/Fields/MediaLibrary.php +++ b/src/Fields/MediaLibrary.php @@ -26,22 +26,6 @@ protected function prepareFill(array $raw = [], mixed $casted = null): mixed return $value; } - protected function resolvePreview(): View|string - { - if ($this->isRawMode()) { - return $this->isMultiple() ? - implode(';', $this->value->map(fn($media): string => $media->getFullUrl())->toArray()) - : ($this->value?->getFullUrl() ?? ''); - } - - return view( - 'moonshine::ui.image', - $this->isMultiple() ? [ - 'values' => $this->getFullPathValues(), - ] : ['value' => current($this->getFullPathValues())] - ); - } - public function getFullPathValues(): array { $values = $this->value;