F
Filament14mo ago
ericmp

How to show current image in EditAction

I have a model which has a spatie image. In the model's filament related table, i have an edit action for each model (modal). So i'd like to let the user upload a new image (which is working), but also showing the current image. how to achieve it? wasnt lucky trying to find it in the documentation for example this model (see img below) has an image, but isnt being shown. how to show it?
EditAction::make('edit')->form([
...
FileUpload::make('cover')->image()
])
EditAction::make('edit')->form([
...
FileUpload::make('cover')->image()
])
No description
2 Replies
Saade
Saade14mo ago
if your image is a Spatie Media Library image, you need to use the SpatieMediaLibrary upload component.
ericmp
ericmpOP14mo ago
u r right it works 🙏 thanks brigado
Want results from more Discord servers?
Add your server