Blackpig
format minutes as hours in form, and save back to database as minutes.
check out modifying the value in the dehydration https://filamentphp.com/docs/3.x/forms/advanced#field-dehydration
5 replies
Filament-User vs. Frontend-User
It's easier to keep them in one table - and for production you will need to enable which users have access to filament https://filamentphp.com/docs/3.x/panels/users#authorizing-access-to-the-panel - depending on your granularity you could just add an
is_admin
flag to the user table and check that6 replies
Select same value multiple times
If i understand correctly you want to be able to select multiple options from a pre-defined list of options? That's probably best suited to a checkbox list https://filamentphp.com/docs/3.x/forms/fields/checkbox-list
9 replies
Managing 3 levels (or more) deep relations.
Nested resources will be natively supported in v4 in the meantime you can use this plugin https://discord.com/channels/883083792112300104/1167940700130791574 which i have used to manage resources nested to 4 levels deep
3 replies
Custom layout - setting data from $get throws fatal Typed property initialization error
I'm trying to use an existing method from the
ViewComponent
- if I change my method from viewData
to layoutData
and getLayoutData
it's all good. Thanks for listening 🦆4 replies
Spatie Translatable Plugin - Repeater Fields Supported
Sorry, been busy with work. If I get time I'll spin up a quick project later. IIRC - I just added the repeater field to the translatable array on the model and added the relevant traits/concerns. The main difference from a normal text input is when switching locale, the text input would be on the page ready for the new language input. But with a repeater - if you have already added 3 in the 'EN' locale and then switch to 'FR' - you would need to add the 3 repeaters again - it doesn't auto-magically create 3 'empty' repeaters awaiting translated input. I also wasn't using the repeater for a relationship - it was data stored in a JSON field on the model.
11 replies