F
Filament7mo 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
Andi7mo ago
bump
toeknee
toeknee7mo ago
Why not use the SpatieMediaLibrary? That will give you the seperate relationship you need?
Andi
Andi7mo 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