Ihab Abu Afia
Ihab Abu Afia
FFilament
Created by Ihab Abu Afia on 12/27/2023 in #❓┊help
I am using filament/spatie-laravel-media-library-plugin but having an issue showing the first image
I was able to upload multiple images in a collection() with no issues at all, but what I am trying to do is showing the first image in the collection in the list of projects table:
Tables\Columns\SpatieMediaLibraryImageColumn::make('image')
->label(__('Image'))
->collection('project-images')
->wrap(),
Tables\Columns\SpatieMediaLibraryImageColumn::make('image')
->label(__('Image'))
->collection('project-images')
->wrap(),
This code is showing the while collection which might have 4, 10, etc..., what I am looking for is to show one (first) of the collection. I was hoping to find a method like
->first()
->first()
or so. Any help please @everyone
12 replies