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:
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 or so.
Any help please @everyone
8 Replies
Solution
->limit(1)
The SpatieImageColumn is an extension of the ImageColumn component, so all the base features are included. See https://filamentphp.com/docs/3.x/tables/columns/image#setting-a-limit
You saved my life π
Goal accomplished. π€£
Well he is a doctor. Life saving is in the job description. π
π
Well done guys.
Nicely played.
Felament people are the best players π