FilamentF
Filament13mo ago
topan

Change State

how to use state correctly? i am a beginner

TextColumn::make('email_verified_at')
->label('Status Email')
->badge()
->color(function (string $state) { 
  return !$state ? "danger" : "success";
})
->sortable()
->formatStateUsing(function (string $state): string {
  return (string)!$state ? "Not Verified" : "Verified";
}),
image.png
Was this page helpful?