Esteban Ojeda
Esteban Ojeda
FFilament
Created by Esteban Ojeda on 10/4/2023 in #❓┊help
Responsive Images in table rows
Currently using size('100%') it's doing the trick (I promise I've been banging my head with this for at least 2h, but didn't thought this would actually work so I didn't try it until now 🤡 😂 ) I'll mark it as solved and leave this post over here in case anyone gets stuck with this issue.
4 replies
FFilament
Created by Mark Chaney on 9/1/2023 in #❓┊help
Filenames and Spatie
Just testing, with this code:
Forms\Components\SpatieMediaLibraryFileUpload::make('file')
->mediaName(fn (Get $get) => $get('name'))
Forms\Components\SpatieMediaLibraryFileUpload::make('file')
->mediaName(fn (Get $get) => $get('name'))
I was able to change the original file name by whatever I introduced in the 'name' input field. I think you can make the logic for your custom name in the closure inside mediaName
30 replies
FFilament
Created by Esteban Ojeda on 9/1/2023 in #❓┊help
Conditionally disabling form fields
Made it! Thank you a lot!
7 replies
FFilament
Created by Esteban Ojeda on 9/1/2023 in #❓┊help
Conditionally disabling form fields
Thanks @awcodes ! I found out that it works using
->disabled(fn (Get $get):bool => filled($get('file')))
->disabled(fn (Get $get):bool => filled($get('file')))
But I think yours would be an optimal solution. Could you provide an example?
7 replies
FFilament
Created by Mark Chaney on 9/1/2023 in #❓┊help
Filenames and Spatie
Maybe silly solution (I'm beginner in Laravel and totally new to filament) but what about intercepting original file name in the mutateFormDataBeforeCreate method for the create/edit resource and replace it with the generated one or something else?
30 replies