capins
capins
FFilament
Created by capins on 3/14/2025 in #❓┊help
Hello,I have a Table column like this:
great!
16 replies
FFilament
Created by capins on 3/14/2025 in #❓┊help
Hello,I have a Table column like this:
I need to sort the list by an attribute, but I don't think it's possibile
16 replies
FFilament
Created by capins on 3/14/2025 in #❓┊help
Hello,I have a Table column like this:
Thanks
16 replies
FFilament
Created by capins on 3/14/2025 in #❓┊help
Hello,I have a Table column like this:
you're right.. it's the easiest way
16 replies
FFilament
Created by capins on 3/14/2025 in #❓┊help
Hello,I have a Table column like this:
Yes, but in color and in formatStateUsing is the EloquentModel. So it handle the state in a different way
16 replies
FFilament
Created by capins on 3/14/2025 in #❓┊help
Hello,I have a Table column like this:
Thankyou Jordy, the way is correct, but the solution is to change the column in
Tables\Columns\TextColumn::make('distances')
Tables\Columns\TextColumn::make('distances')
with the whole relationship, and then inside use
Tables\Columns\TextColumn::make('distances')
->formatStateUsing(fn($state) => $state->lenght)
->listWithLineBreaks()
->badge()
->color(fn($state) => $state->is_competitive ? 'success' : 'info')
->prefix('km ')
->suffix(fn($state) => $state->is_competitive ? 'n.c.' : '')
->sortable(),
Tables\Columns\TextColumn::make('distances')
->formatStateUsing(fn($state) => $state->lenght)
->listWithLineBreaks()
->badge()
->color(fn($state) => $state->is_competitive ? 'success' : 'info')
->prefix('km ')
->suffix(fn($state) => $state->is_competitive ? 'n.c.' : '')
->sortable(),
but the weird think is that color and formatstateusing work great, but suffix return an error, because inside suffix the state is a collection and not a eloquen model
16 replies