Determine Toggle label by state
Is there a way to change the label of a
This is what I tried, but it doesn't work:
\Filament\Forms\Components\Toggle based on its value?This is what I tried, but it doesn't work:
Toggle::make('active')
->label(fn ($record) => $record->active ? 'Active' : 'Inactive')