Open firatdgn opened 1 day ago
I have successfully implemented a working RelationManager
without using the ->model($this->getOwnerRecord())
method in the form, and it saves data perfectly. If it is still not working for you, you can try the following configuration for your file upload field:
SpatieMediaLibraryFileUpload::make('upload_quote')
->label(__('inba::labels.upload_quote'))
->collection('upload_quote')
->acceptedFileTypes(['application/pdf', 'image/jpeg', 'image/png', 'image/webp'])
->helperText('.pdf, .jpg, .jpeg, .png, .webp')
->statePath('data'); // Map the state to the 'data' attribute
@firatdgn
Package
filament/filament
Package Version
v3.2.124
Laravel Version
10.48.24
Livewire Version
No response
PHP Version
PHP 8.2.25
Problem description
I have CustomerResource to handle Customer CRUD. I want to implement that File upload capability for the customers.I have installed Spatie Media Library plugin then created a relation manager. My purpose is to upload file with relation manager. I have set the resource form. It is listed as expected but, when I upload file and it throws SQL error:
Expected behavior
I was expecting to see upload file the local and insert data to table
Steps to reproduce
I went to customer view page and try to upload file
Reproduction repository (issue will be closed if this is not valid)
https://github.com/firatdgn/filament-issue
Relevant log output
No response
Donate 💰 to fund this issue