SpatieMediaLibraryFileUpload on a related record
I have a User model and a Customer model, they have a one-to-one relationship with each other.
User model implements the
Spatie\MediaLibrary\HasMedia and uses the Spatie\MediaLibrary\InteractsWithMedia trait.
Using SpatieMediaLibraryFileUpload component in a form in User resource works fine, it loads the media when you're in the Edit page.
For the Customer resource, it doesn't load on edit page even when I put a ->relationship('user') in a layout form component like Section.
My current solution for this is :
I was wondering if there's a more "native" approach for this.0 Replies