Hi! How can I alter data before displaying it in the table?

So I have data coming in form my DB and I want to show the data in better text. For example, I have a "status" column containing information like "payment_pending", But I want to table to show it as "Payment Pending." Any and all help appreciate. Thanks in advance!
3 Replies
Kenneth Sese
Kenneth Seseβ€’2y ago
Filament
Text column - Columns - Table Builder - Filament
The elegant TALL stack table builder for Laravel artisans.
Cybrarist
Cybraristβ€’2y ago
you can use
TextColumn::make('column')->formatStateUsing(function ($record (if u want the whole record) or $state (if u want the value) ) { return $manipulated }),
TextColumn::make('column')->formatStateUsing(function ($record (if u want the whole record) or $state (if u want the value) ) { return $manipulated }),
K R A T O S
K R A T O SOPβ€’2y ago
That helps mate! Thanks a lot 😁
Want results from more Discord servers?
Add your server