Spatie Media Library outside a Resource
I'm using this field on a Filament Form added to a Livewire component.
I can't seem to find a way to provide the Model for where to attach the media.
Did I miss it?
In the docs, I understand there's something to be done. I follow the link and find nothing about relationships. Wrong link, or missing piece maybe?
https://filamentphp.com/plugins/filament-spatie-media-library
Filament
Spatie Media Library by Filament - Filament
Filament support for Spatie's Laravel Media Library package.
4 Replies
Looks like the link is pointing to the v2 docs, the main thing would be setting up the model on your form component, updated docs for V3 are here: https://filamentphp.com/docs/3.x/forms/adding-a-form-to-a-livewire-component#setting-a-form-model
Oh, wow, exactly this!
I didn't even notice I was on V2 docs
Thanks!
Will you make the PR to the docs?
(or should I? and mention you)
I'll do it now π
It stored the image.
After storing, the form field is ready to upload again.
Shouldn't it be "filled" with the current image?