Wayne_Swart
Wayne_Swart
FFilament
Created by Wayne_Swart on 1/24/2024 in #❓┊help
Use resource record ID in file upload path
I need to use the record id in my file path when uploading files. Is this possible, and if so, how would I go about doing that? This is my form:
Section::make()
->description('Attach any files related to this policy')
->heading('Claim attachments')
->schema([
FileUpload::make('attachments')
->label('')
->multiple()
->disk('public')
->directory('claim-attachments')
->preserveFilenames()
->downloadable()
->enableOpen()
->previewable(false)
]),
Section::make()
->description('Attach any files related to this policy')
->heading('Claim attachments')
->schema([
FileUpload::make('attachments')
->label('')
->multiple()
->disk('public')
->directory('claim-attachments')
->preserveFilenames()
->downloadable()
->enableOpen()
->previewable(false)
]),
I would like to use something like, ->directory('claim-attachments' . $this->id)
9 replies
FFilament
Created by Wayne_Swart on 1/23/2024 in #❓┊help
File uploads storage location and relationships
I am rewriting a project that has existing data. The last part I am struggling with is the attachments linked to insurance claims. I have a claims table and a claim_attachments table. I need help with the following 2 aspects: When I upload multiple files I would like them stored in public/$claim_id/$preserved_file_name. How would I go about specifying the claim_id in the path of the storage? Do I also need a link table that holds reference of the attachment file name and claim_id's? Thanks for the help.
1 replies
FFilament
Created by Wayne_Swart on 1/16/2024 in #❓┊help
Multiple select filter does not reload
Hey guys Whenever I use a multiple select filter my table doesn't reload when the filters are changed/updated. Removing the multiple() method from the filter does reload the table automatically. Whenever I use the multiple() method I have to use F5 to reload the page with the updated selected filters. Is this typical behavior or am I missing something? Thanks.
5 replies