FileUpload with dynamic folder name
I'm using Filament to upload product images. I would like to create a folder structure as follows: Hence I would like to use the product name (product1...productN) in the ->directory() method. Anyone could provide an example on how to do this?
Solution:Jump to solution
Assuming you have a 'slug' field you can do
->directory(fn ($get) => $get('slug'))
...2 Replies