noahlocke
noahlocke
FFilament
Created by noahlocke on 4/26/2024 in #❓┊help
Is it possible to sort options in a Select form field?
I have a Select field pulling in options from a relationship. Trouble is, they are sorted alphabetically, but I have a custom sort order on the model using a sort_order column. I don't see anything in the docs that indicates that this is possible, but figured I'd ask before I venture down the road of a custom field (would rather not). Here's my code example:
Select::make('noteServices')
->multiple()
->preload()
->relationship(
name: 'services',
titleAttribute: 'name'
),
Select::make('noteServices')
->multiple()
->preload()
->relationship(
name: 'services',
titleAttribute: 'name'
),
2 replies
FFilament
Created by noahlocke on 10/2/2023 in #❓┊help
Change $modelLabel on Relation Manager table?
Looking for a way to affect the modelLabel on a Relation Manager table... I have a resource, ClientResource where I've specified the following:
protected static ?string $modelLabel = 'Consumer';
protected static ?string $pluralModelLabel = 'Consumers';
protected static ?string $modelLabel = 'Consumer';
protected static ?string $pluralModelLabel = 'Consumers';
This works well across my Panel, however, the one place that doesn't seem to be picking up the memo is the title of my ClientRelationManager tables which still refer to the model as Clients
3 replies
FFilament
Created by noahlocke on 9/29/2023 in #❓┊help
TextEntry::make()->placeholder() question...
Hi all, I'm finding myself putting ->placeholder('Blank') on every single TextEntry in my Infolists. Question: is there a method to globally apply this behavior? Essentially, anytime a field returns null or an empty string, I'd like to display "Blank" to the user... Thanks!
3 replies
FFilament
Created by noahlocke on 9/27/2023 in #❓┊help
Migrating from Laravel Nova to Filament v3
Hey friends, new to Filament. After much time spent researching the framework and chat with @Dan Harrin, I've decided it's a better option than Nova. I have an app for a client that's been in production on Nova 3 for some time and I need to port/migrate over to Filament. Before I begin planning out my steps, I wanted to first check to see if anyone here has successfully made the migration. Any tips/gotchas/advice? Much appreciated!
4 replies