© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•2y ago•
1 reply
Štakor

Repeater Item Loss in Filament Resource with SpatieMediaLibraryFileUpload

What I am trying to do:
I'm attempting to implement a repeater in my Filament resource that allows adding multiple construction progress images with associated metadata. Each item should be saved to the disk and have an entry in the Spatie media library table.
What I did:

Set up a Repeater field in my DevelopmentResource with SpatieMediaLibraryFileUpload and other form components.
Implemented mutateFormDataBeforeFill method in the EditDevelopment page to populate the repeater with existing data.
Configured the Development model with InteractsWithMedia trait and necessary media collections.

My issue/the error:
When I add the first repeater item, it works correctly - the image is saved to disk and an entry is created in the Spatie media library table. However, after saving and trying to add a new item, the old (first) item is lost from the database, and only the new added item remains. It seems that there's always only one item persisting.

Can anyone offer any advice as I've been dealing with it for a while now.
image.png
image.png
image.png
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

SpatieMediaLibraryFileUpload collection in repeater with get gives error
FilamentFFilament / ❓┊help
4mo ago
SpatieMediaLibraryFileUpload inside a Repeater
FilamentFFilament / ❓┊help
2y ago
Delete Item in Repeater
FilamentFFilament / ❓┊help
10mo ago
Custom Remove Item in Repeater
FilamentFFilament / ❓┊help
3y ago