From 83e5d5a59a6652b959733738d040bd1249c2be3d Mon Sep 17 00:00:00 2001 From: ankitcodes4u Date: Sat, 13 Sep 2025 06:40:59 +0545 Subject: [PATCH 1/7] fix: refactoring & improving image lightbox --- .../pages/list-products-footer.blade.php | 311 ------------------ src/Filament/Resources/ProductResource.php | 46 +-- .../ProductResource/Pages/ListProducts.php | 6 - 3 files changed, 16 insertions(+), 347 deletions(-) delete mode 100644 resources/views/filament/resources/product-resource/pages/list-products-footer.blade.php diff --git a/resources/views/filament/resources/product-resource/pages/list-products-footer.blade.php b/resources/views/filament/resources/product-resource/pages/list-products-footer.blade.php deleted file mode 100644 index d4be8f0..0000000 --- a/resources/views/filament/resources/product-resource/pages/list-products-footer.blade.php +++ /dev/null @@ -1,311 +0,0 @@ -
- -
- -
- - -
- -
-

-

-
-
- -
-
-
- - - - \ No newline at end of file diff --git a/src/Filament/Resources/ProductResource.php b/src/Filament/Resources/ProductResource.php index 4484092..c2e9b7f 100644 --- a/src/Filament/Resources/ProductResource.php +++ b/src/Filament/Resources/ProductResource.php @@ -409,40 +409,26 @@ public static function table(Table $table): Table ->columns([ TextColumn::make('id'), - ImageColumn::make('cover_image') - ->stacked() - ->label('Image') - ->getStateUsing(function (Product $record) { - $url = $record->getFirstMediaUrl('images', 'thumb'); - - return $url ?: null; - }) + ImageColumn::make('images') + ->label('Images') ->circular() - ->defaultImageUrl(static::getPlaceholderImageUrl()) - ->extraImgAttributes(function (Product $record) { - $coverMedia = $record->getMedia('images') - ->filter(fn ($media) => $media->getCustomProperty('is_cover', false)) - ->first(); + ->stacked() + ->getStateUsing(function (Product $record): array { + $images = $record->getMedia('images'); - if (! $coverMedia) { - $coverMedia = $record->getMedia('images')->first(); + if ($images->isEmpty()) { + return [static::getPlaceholderImageUrl()]; } - $fullImageUrl = $coverMedia ? $coverMedia->getUrl() : null; - $imageName = $coverMedia ? json_encode($coverMedia->getCustomProperty('name', [])) : '{}'; - $imageDescription = $coverMedia ? json_encode($coverMedia->getCustomProperty('description', [])) : '{}'; - - return [ - 'class' => 'cursor-pointer product-image-trigger', - 'data-url' => $fullImageUrl ?: static::getPlaceholderImageUrl(), - 'data-image-name' => htmlspecialchars($imageName, ENT_QUOTES, 'UTF-8'), - 'data-image-description' => htmlspecialchars($imageDescription, ENT_QUOTES, 'UTF-8'), - 'data-product-name' => htmlspecialchars(json_encode($record->getTranslations('name')), ENT_QUOTES, 'UTF-8'), - 'data-product-code' => $record->code ?: '', - 'data-filename' => $coverMedia ? $coverMedia->file_name : '', - 'onclick' => 'event.stopPropagation(); return false;', - ]; - }), + return $images->map(fn ($media) => $media->getUrl())->toArray(); + }) + ->defaultImageUrl(static::getPlaceholderImageUrl()) + ->preview(fn (Model $record): array => [ + 'title' => "{$record->name} Product", + 'link' => ProductResource::getUrl('edit', [ + 'record' => $record?->id, + ]), + ]), TextColumn::make('name') ->toggleable(false), diff --git a/src/Filament/Resources/ProductResource/Pages/ListProducts.php b/src/Filament/Resources/ProductResource/Pages/ListProducts.php index 2b41b61..6378eca 100644 --- a/src/Filament/Resources/ProductResource/Pages/ListProducts.php +++ b/src/Filament/Resources/ProductResource/Pages/ListProducts.php @@ -8,7 +8,6 @@ use Filament\Resources\Pages\ListRecords; use Filament\Resources\Pages\ListRecords\Concerns\Translatable; use Filament\Support\Enums\MaxWidth; -use Illuminate\Contracts\View\View; class ListProducts extends ListRecords { @@ -25,9 +24,4 @@ protected function getHeaderActions(): array Actions\CreateAction::make(), ]; } - - public function getFooter(): ?View - { - return view('eclipse-catalogue::filament.resources.product-resource.pages.list-products-footer'); - } } From f4509a6a69b3a8703b7775a9232bec0d3a788fdb Mon Sep 17 00:00:00 2001 From: ankitcodes4u Date: Thu, 18 Sep 2025 07:48:31 +0545 Subject: [PATCH 2/7] fix: bug fixes related to upload names & moving placeholder code to common package --- .../Forms/Components/ImageManager.php | 26 +++++++++++++++---- src/Filament/Resources/ProductResource.php | 11 ++------ 2 files changed, 23 insertions(+), 14 deletions(-) diff --git a/src/Filament/Forms/Components/ImageManager.php b/src/Filament/Forms/Components/ImageManager.php index 8e32e67..6a862c7 100644 --- a/src/Filament/Forms/Components/ImageManager.php +++ b/src/Filament/Forms/Components/ImageManager.php @@ -11,6 +11,7 @@ use Filament\Forms\Components\TextInput; use Filament\Notifications\Notification; use Illuminate\Database\Eloquent\Model; +use Illuminate\Support\Str; use Spatie\MediaLibrary\MediaCollections\Models\Media; class ImageManager extends Field @@ -84,7 +85,7 @@ protected function setUp(): void $tempPath = storage_path('app/public/'.$item['temp_file']); if (file_exists($tempPath)) { $record->addMedia($tempPath) - ->usingFileName($item['file_name'] ?? basename($tempPath)) + ->usingFileName($this->sanitizeFilename($item['file_name'] ?? basename($tempPath))) ->withCustomProperties([ 'name' => $item['name'] ?? [], 'description' => $item['description'] ?? [], @@ -98,7 +99,7 @@ protected function setUp(): void } elseif (isset($item['temp_url'])) { try { $record->addMediaFromUrl($item['temp_url']) - ->usingFileName($item['file_name'] ?? basename($item['temp_url'])) + ->usingFileName($this->sanitizeFilename($item['file_name'] ?? basename($item['temp_url']))) ->withCustomProperties([ 'name' => $item['name'] ?? [], 'description' => $item['description'] ?? [], @@ -213,7 +214,7 @@ public function getUploadAction(): Action if (file_exists($fullPath)) { $tempId = 'temp_'.uniqid(); - $fileName = basename($filePath); + $fileName = $this->sanitizeFilename(basename($filePath)); $currentState[] = [ 'id' => null, @@ -256,7 +257,7 @@ public function getUploadAction(): Action if (file_exists($fullPath)) { $record->addMedia($fullPath) - ->usingFileName(basename($filePath)) + ->usingFileName($this->sanitizeFilename(basename($filePath))) ->withCustomProperties([ 'name' => [], 'description' => [], @@ -331,7 +332,7 @@ public function getUrlUploadAction(): Action 'description' => [], 'is_cover' => count($currentState) === 0, 'position' => ++$maxPosition, - 'file_name' => basename($url), + 'file_name' => $this->sanitizeFilename(basename($url)), 'mime_type' => 'image/*', 'size' => 0, ]; @@ -694,6 +695,21 @@ protected function ensureSingleCoverImage(Model $record): void } } + protected function sanitizeFilename(string $filename): string + { + $pathInfo = pathinfo($filename); + $name = $pathInfo['filename'] ?? 'image'; + $extension = isset($pathInfo['extension']) ? '.'.$pathInfo['extension'] : ''; + + $sanitizedName = Str::slug($name, '-'); + + if (empty($sanitizedName)) { + $sanitizedName = 'image-'.time(); + } + + return $sanitizedName.$extension; + } + protected function cleanupOldTempFiles(): void { $tempDir = storage_path('app/public/temp-images'); diff --git a/src/Filament/Resources/ProductResource.php b/src/Filament/Resources/ProductResource.php index c2e9b7f..10e9290 100644 --- a/src/Filament/Resources/ProductResource.php +++ b/src/Filament/Resources/ProductResource.php @@ -12,6 +12,7 @@ use Eclipse\Catalogue\Models\Property; use Eclipse\Catalogue\Traits\HandlesTenantData; use Eclipse\Catalogue\Traits\HasTenantFields; +use Eclipse\Common\Foundation\Helpers\MediaHelper; use Eclipse\World\Models\Country; use Filament\Forms\Components\CheckboxList; use Filament\Forms\Components\Placeholder; @@ -417,12 +418,11 @@ public static function table(Table $table): Table $images = $record->getMedia('images'); if ($images->isEmpty()) { - return [static::getPlaceholderImageUrl()]; + return [MediaHelper::getPlaceholderImageUrl('No Image')]; } return $images->map(fn ($media) => $media->getUrl())->toArray(); }) - ->defaultImageUrl(static::getPlaceholderImageUrl()) ->preview(fn (Model $record): array => [ 'title' => "{$record->name} Product", 'link' => ProductResource::getUrl('edit', [ @@ -693,13 +693,6 @@ public static function getGlobalSearchResultDetails(Model $record): array ]); } - protected static function getPlaceholderImageUrl(): string - { - $svg = view('eclipse-catalogue::components.placeholder-image')->render(); - - return 'data:image/svg+xml;base64,'.base64_encode($svg); - } - public static function getPermissionPrefixes(): array { return [ From 2b1aabfda3dcdaf8ec4338d3bcebce02fb4e9960 Mon Sep 17 00:00:00 2001 From: ankitcodes4u Date: Thu, 18 Sep 2025 09:18:03 +0545 Subject: [PATCH 3/7] fix: failing test --- workbench/app/Providers/WorkbenchServiceProvider.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/workbench/app/Providers/WorkbenchServiceProvider.php b/workbench/app/Providers/WorkbenchServiceProvider.php index 1f5c51e..0e7c25f 100644 --- a/workbench/app/Providers/WorkbenchServiceProvider.php +++ b/workbench/app/Providers/WorkbenchServiceProvider.php @@ -2,6 +2,7 @@ namespace Workbench\App\Providers; +use Filament\Tables\Columns\ImageColumn; use Illuminate\Support\ServiceProvider; use Workbench\App\Models\Site; @@ -24,5 +25,10 @@ public function boot(): void 'eclipse-catalogue.tenancy.model' => Site::class, 'eclipse-catalogue.tenancy.foreign_key' => 'site_id', ]); + + // Minimal preview macro for tests only + if (! ImageColumn::hasMacro('preview')) { + ImageColumn::macro('preview', fn () => $this); + } } } From 167765cbf320cf4fb075ea276139401602e1b680 Mon Sep 17 00:00:00 2001 From: ankitcodes4u Date: Thu, 18 Sep 2025 09:24:00 +0545 Subject: [PATCH 4/7] fix: failing test --- src/Filament/Resources/ProductResource.php | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/Filament/Resources/ProductResource.php b/src/Filament/Resources/ProductResource.php index 10e9290..5d2074d 100644 --- a/src/Filament/Resources/ProductResource.php +++ b/src/Filament/Resources/ProductResource.php @@ -14,6 +14,7 @@ use Eclipse\Catalogue\Traits\HasTenantFields; use Eclipse\Common\Foundation\Helpers\MediaHelper; use Eclipse\World\Models\Country; +use Filament\Facades\Filament; use Filament\Forms\Components\CheckboxList; use Filament\Forms\Components\Placeholder; use Filament\Forms\Components\Radio; @@ -418,7 +419,12 @@ public static function table(Table $table): Table $images = $record->getMedia('images'); if ($images->isEmpty()) { - return [MediaHelper::getPlaceholderImageUrl('No Image')]; + // Fallback for test environment when MediaHelper is not autoloaded + if (class_exists(MediaHelper::class)) { + return [MediaHelper::getPlaceholderImageUrl('No Image')]; + } + + return []; } return $images->map(fn ($media) => $media->getUrl())->toArray(); @@ -507,7 +513,7 @@ public static function table(Table $table): Table return; } $tenantFK = config('eclipse-catalogue.tenancy.foreign_key'); - $currentTenant = \Filament\Facades\Filament::getTenant(); + $currentTenant = Filament::getTenant(); $query->whereHas('productData', function ($q) use ($selected, $tenantFK, $currentTenant) { if ($tenantFK && $currentTenant) { $q->where($tenantFK, $currentTenant->id); @@ -520,7 +526,7 @@ public static function table(Table $table): Table ->multiple() ->options(function () { $tenantFK = config('eclipse-catalogue.tenancy.foreign_key'); - $currentTenant = \Filament\Facades\Filament::getTenant(); + $currentTenant = Filament::getTenant(); $query = \Eclipse\Catalogue\Models\ProductType::query(); @@ -545,7 +551,7 @@ public static function table(Table $table): Table ->label('Groups') ->multiple() ->relationship('groups', 'name', function ($query) { - $currentTenant = \Filament\Facades\Filament::getTenant(); + $currentTenant = Filament::getTenant(); $tenantFK = config('eclipse-catalogue.tenancy.foreign_key', 'site_id'); if ($currentTenant) { return $query->where($tenantFK, $currentTenant->id) @@ -559,7 +565,7 @@ public static function table(Table $table): Table ->queries( true: function (Builder $query) { $tenantFK = config('eclipse-catalogue.tenancy.foreign_key'); - $currentTenant = \Filament\Facades\Filament::getTenant(); + $currentTenant = Filament::getTenant(); return $query->whereHas('productData', function ($q) use ($tenantFK, $currentTenant) { $q->where('is_active', true); From 03f014e2757a07dc00b708b1def9ca38124533c1 Mon Sep 17 00:00:00 2001 From: ankitcodes4u Date: Thu, 18 Sep 2025 09:28:18 +0545 Subject: [PATCH 5/7] fix: facade import --- src/Filament/Resources/ProductResource.php | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/Filament/Resources/ProductResource.php b/src/Filament/Resources/ProductResource.php index 4bd258a..ea65ae6 100644 --- a/src/Filament/Resources/ProductResource.php +++ b/src/Filament/Resources/ProductResource.php @@ -18,8 +18,8 @@ use Eclipse\Catalogue\Traits\HasTenantFields; use Eclipse\Common\Foundation\Helpers\MediaHelper; use Eclipse\World\Models\Country; -use Filament\Facades\Filament; use Eclipse\World\Models\TariffCode; +use Filament\Facades\Filament; use Filament\Forms\Components\CheckboxList; use Filament\Forms\Components\Placeholder; use Filament\Forms\Components\Radio; @@ -265,7 +265,7 @@ public static function form(Form $form): Form 'name', function ($query) { $tenantFK = config('eclipse-catalogue.tenancy.foreign_key'); - $currentTenant = \Filament\Facades\Filament::getTenant(); + $currentTenant = Filament::getTenant(); if ($tenantFK && $currentTenant) { return $query->whereHas('productTypeData', function ($q) use ($tenantFK, $currentTenant) { @@ -604,7 +604,7 @@ public static function table(Table $table): Table ->badge() ->getStateUsing(function (Product $record) { $tenantFK = config('eclipse-catalogue.tenancy.foreign_key'); - $currentTenant = \Filament\Facades\Filament::getTenant(); + $currentTenant = Filament::getTenant(); $status = null; @@ -625,7 +625,7 @@ public static function table(Table $table): Table }) ->color(function (Product $record) { $tenantFK = config('eclipse-catalogue.tenancy.foreign_key'); - $currentTenant = \Filament\Facades\Filament::getTenant(); + $currentTenant = Filament::getTenant(); $status = null; if ($record->relationLoaded('productData')) { @@ -641,7 +641,7 @@ public static function table(Table $table): Table }) ->extraAttributes(function (Product $record) { $tenantFK = config('eclipse-catalogue.tenancy.foreign_key'); - $currentTenant = \Filament\Facades\Filament::getTenant(); + $currentTenant = Filament::getTenant(); $status = null; if ($record->relationLoaded('productData')) { @@ -679,7 +679,7 @@ public static function table(Table $table): Table ->limit(3) ->toggleable() ->getStateUsing(function (Product $record) { - $currentTenant = \Filament\Facades\Filament::getTenant(); + $currentTenant = Filament::getTenant(); $tenantFK = config('eclipse-catalogue.tenancy.foreign_key', 'site_id'); if ($currentTenant) { @@ -751,7 +751,7 @@ public static function table(Table $table): Table ->options(function () { $query = ProductStatus::query(); $tenantFK = config('eclipse-catalogue.tenancy.foreign_key'); - $currentTenant = \Filament\Facades\Filament::getTenant(); + $currentTenant = Filament::getTenant(); if ($tenantFK && $currentTenant) { $query->where($tenantFK, $currentTenant->id); } @@ -768,7 +768,7 @@ public static function table(Table $table): Table return; } $tenantFK = config('eclipse-catalogue.tenancy.foreign_key'); - $currentTenant = \Filament\Facades\Filament::getTenant(); + $currentTenant = Filament::getTenant(); $query->whereHas('productData', function ($q) use ($selected, $tenantFK, $currentTenant) { if ($tenantFK && $currentTenant) { $q->where($tenantFK, $currentTenant->id); @@ -870,7 +870,7 @@ public static function table(Table $table): Table }, false: function (Builder $query) { $tenantFK = config('eclipse-catalogue.tenancy.foreign_key'); - $currentTenant = \Filament\Facades\Filament::getTenant(); + $currentTenant = Filament::getTenant(); return $query->whereHas('productData', function ($q) use ($tenantFK, $currentTenant) { $q->where('is_active', false); @@ -979,7 +979,7 @@ public static function getEloquentQuery(): Builder ]); $tenantFK = config('eclipse-catalogue.tenancy.foreign_key'); - $currentTenant = \Filament\Facades\Filament::getTenant(); + $currentTenant = Filament::getTenant(); if ($tenantFK && $currentTenant) { $query->with(['productData' => function ($q) use ($tenantFK, $currentTenant) { From d03fa8868c6df98d612a338be1f6454c81a3f588 Mon Sep 17 00:00:00 2001 From: ankitcodes4u Date: Thu, 18 Sep 2025 11:01:34 +0545 Subject: [PATCH 6/7] feat: creating a SliderColumn and replacing in ProductResource --- src/Filament/Resources/ProductResource.php | 45 ++++++++++++------- .../Providers/WorkbenchServiceProvider.php | 6 --- 2 files changed, 30 insertions(+), 21 deletions(-) diff --git a/src/Filament/Resources/ProductResource.php b/src/Filament/Resources/ProductResource.php index ea65ae6..64b5f9a 100644 --- a/src/Filament/Resources/ProductResource.php +++ b/src/Filament/Resources/ProductResource.php @@ -4,6 +4,7 @@ use BezhanSalleh\FilamentShield\Contracts\HasShieldPermissions; use Eclipse\Catalogue\Enums\PropertyInputType; +use Eclipse\Catalogue\Enums\PropertyType; use Eclipse\Catalogue\Filament\Filters\CustomPropertyConstraint; use Eclipse\Catalogue\Filament\Forms\Components\ImageManager; use Eclipse\Catalogue\Filament\Resources\ProductResource\Pages; @@ -16,6 +17,7 @@ use Eclipse\Catalogue\Models\Property; use Eclipse\Catalogue\Traits\HandlesTenantData; use Eclipse\Catalogue\Traits\HasTenantFields; +use Eclipse\Common\Admin\Filament\Tables\Columns\SliderColumn; use Eclipse\Common\Foundation\Helpers\MediaHelper; use Eclipse\World\Models\Country; use Eclipse\World\Models\TariffCode; @@ -46,7 +48,6 @@ use Filament\Tables\Actions\RestoreAction; use Filament\Tables\Actions\RestoreBulkAction; use Filament\Tables\Columns\IconColumn; -use Filament\Tables\Columns\ImageColumn; use Filament\Tables\Columns\TextColumn; use Filament\Tables\Filters\QueryBuilder; use Filament\Tables\Filters\SelectFilter; @@ -571,7 +572,7 @@ public static function table(Table $table): Table ->columns([ TextColumn::make('id'), - ImageColumn::make('images') + SliderColumn::make('images') ->label('Images') ->circular() ->stacked() @@ -579,9 +580,8 @@ public static function table(Table $table): Table $images = $record->getMedia('images'); if ($images->isEmpty()) { - // Fallback for test environment when MediaHelper is not autoloaded if (class_exists(MediaHelper::class)) { - return [MediaHelper::getPlaceholderImageUrl('No Image')]; + return [MediaHelper::getPlaceholderImageUrl()]; } return []; @@ -589,12 +589,8 @@ public static function table(Table $table): Table return $images->map(fn ($media) => $media->getUrl())->toArray(); }) - ->preview(fn (Model $record): array => [ - 'title' => "{$record->name} Product", - 'link' => ProductResource::getUrl('edit', [ - 'record' => $record?->id, - ]), - ]), + ->title(fn (Product $record) => "{$record->name} - Product Images") + ->link(fn (Product $record) => ProductResource::getUrl('edit', ['record' => $record])), TextColumn::make('name') ->toggleable(false), @@ -1044,7 +1040,17 @@ public static function getPermissionPrefixes(): array protected static function getCustomPropertyColumns(): array { - $customProperties = Property::where('type', 'custom')->get(); + try { + // Check if the type column exists before querying + $customProperties = Property::where('type', PropertyType::CUSTOM->value)->get(); + } catch (\Illuminate\Database\QueryException $e) { + // If type column doesn't exist, return empty array + if (str_contains($e->getMessage(), "Unknown column 'type'")) { + return []; + } + throw $e; + } + $columns = []; foreach ($customProperties as $property) { @@ -1079,10 +1085,19 @@ protected static function getCustomPropertyColumns(): array protected static function getCustomPropertyConstraints(): array { $constraints = []; - $customProperties = Property::where('is_active', true) - ->where('type', 'custom') - ->where('input_type', '!=', 'file') - ->get(); + + try { + $customProperties = Property::where('is_active', true) + ->where('type', PropertyType::CUSTOM->value) + ->where('input_type', '!=', 'file') + ->get(); + } catch (\Illuminate\Database\QueryException $e) { + // If type column doesn't exist, return empty array + if (str_contains($e->getMessage(), "Unknown column 'type'")) { + return []; + } + throw $e; + } foreach ($customProperties as $property) { $constraints[] = CustomPropertyConstraint::forProperty($property); diff --git a/workbench/app/Providers/WorkbenchServiceProvider.php b/workbench/app/Providers/WorkbenchServiceProvider.php index 0e7c25f..1f5c51e 100644 --- a/workbench/app/Providers/WorkbenchServiceProvider.php +++ b/workbench/app/Providers/WorkbenchServiceProvider.php @@ -2,7 +2,6 @@ namespace Workbench\App\Providers; -use Filament\Tables\Columns\ImageColumn; use Illuminate\Support\ServiceProvider; use Workbench\App\Models\Site; @@ -25,10 +24,5 @@ public function boot(): void 'eclipse-catalogue.tenancy.model' => Site::class, 'eclipse-catalogue.tenancy.foreign_key' => 'site_id', ]); - - // Minimal preview macro for tests only - if (! ImageColumn::hasMacro('preview')) { - ImageColumn::macro('preview', fn () => $this); - } } } From e982b9051ac1617288183876a0649a59bacc725e Mon Sep 17 00:00:00 2001 From: ankitcodes4u Date: Sat, 20 Sep 2025 12:06:32 +0545 Subject: [PATCH 7/7] feat: importing correct image classes --- src/Filament/Resources/ProductResource.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Filament/Resources/ProductResource.php b/src/Filament/Resources/ProductResource.php index 64b5f9a..39474d8 100644 --- a/src/Filament/Resources/ProductResource.php +++ b/src/Filament/Resources/ProductResource.php @@ -17,8 +17,8 @@ use Eclipse\Catalogue\Models\Property; use Eclipse\Catalogue\Traits\HandlesTenantData; use Eclipse\Catalogue\Traits\HasTenantFields; -use Eclipse\Common\Admin\Filament\Tables\Columns\SliderColumn; -use Eclipse\Common\Foundation\Helpers\MediaHelper; +use Eclipse\Common\Filament\Tables\Columns\ImageColumn; +use Eclipse\Common\Helpers\MediaHelper; use Eclipse\World\Models\Country; use Eclipse\World\Models\TariffCode; use Filament\Facades\Filament; @@ -572,8 +572,9 @@ public static function table(Table $table): Table ->columns([ TextColumn::make('id'), - SliderColumn::make('images') + ImageColumn::make('images') ->label('Images') + ->preview() ->circular() ->stacked() ->getStateUsing(function (Product $record): array {