sundays
sundays
FFilament
Created by sundays on 6/5/2024 in #❓┊help
Possible bug with unescaped quotes in table group titles
No description
6 replies
FFilament
Created by sundays on 5/2/2024 in #❓┊help
Hide form field in relation manager create modal
I am reusing a resource's form in a relation manager (e.g. return UserResource::form($form)) and I want to hide a field when the form is being rendered in the relation manager modal, but not in the normal create user page. I can't find any way to do that using the visible function, the operation is create in both views. any tips?
4 replies
FFilament
Created by sundays on 12/19/2023 in #❓┊help
FileUpload hasValidSignature aborts and returns 401
- I am using Cloudflare and deploying on Ploi - APP_URL and ASSET_URL are correctly set - I am forcing https scheme in staging/prod environments - TrustProxies is correctly configured using monicahq/laravel-cloudflare - X-Forwarded-For and X-Forwarded-Proto are being correctly set running out of ideas. Everything else works correctly, but when filament makes a request to livewire/upload-file it wants to use http all of a sudden (hence using \URL::forceScheme('https');)
5 replies
FFilament
Created by sundays on 12/11/2023 in #❓┊help
S3 FileUpload tries to load preview from localhost
Forms\Components\FileUpload::make('file')
->required()
->label('Message file')
->disk('messages')
->maxSize(1024 * 20)
->acceptedFileTypes(['audio/mpeg'])
Forms\Components\FileUpload::make('file')
->required()
->label('Message file')
->disk('messages')
->maxSize(1024 * 20)
->acceptedFileTypes(['audio/mpeg'])
When I use Storage::disk('messages')->url(); with the file name stored in the database I get the correct URL back to the s3 bucket. But in the admin panel, filament seems to be trying to load the file from localhost no matter what I do. I tried setting visibility to 'public' or 'private' but that didn't help. My ACL is disabled. AWS_URL is set and the disk filesystem is configured correctly, any ideas?
3 replies
FFilament
Created by sundays on 12/8/2023 in #❓┊help
Access TemporaryUploadedFile in mutateFormDataBeforeCreate
How do I access a FileUpload field's TemporaryUploadedFile in the mutateFormDataBeforeCreate method? The $data array that gets passed to that function contains the file's string name, not the temporary object. I tried using $this->form->getComponent() to get the FileUpload field but I can't seem to get it that way
6 replies
FFilament
Created by sundays on 12/6/2023 in #❓┊help
Calculated fields in form builder
Hi, I can't find the documentation section that describes how to do "calculated" fields in the form builder. I have a FileUpload field and I need to store some information about the file in the database, in my case audio length in milliseconds. What's the lifecycle function I can use to fill my audio_length field based on the file upload? Do I have to do this by listening to a model created event, and fill the column after the row is added?
4 replies
FFilament
Created by sundays on 7/30/2023 in #❓┊help
Boolean state for timestamp column
5 replies