F
Filament13mo ago
Andi

FileUpload using polymorphic relationship

Hi I try to use a polymorphic relationship for files, but I can't really figure out, how to save a file to a specific relationship. FileUpload doesn't provide a relationship method as far as I see. So is it only possible to save a file name to a text field as either the name or an array? Thanks for your help.
3 Replies
Andi
AndiOP13mo ago
bump
toeknee
toeknee13mo ago
Why not use the SpatieMediaLibrary? That will give you the seperate relationship you need?
Andi
AndiOP12mo ago
I want to understand how this would work and also 1 more plugin is another dependency with a lot of functions I won't need
Want results from more Discord servers?
Add your server