can i add action button to a stat widget?
I have this widget card. i want to add a button to it and when the user click it I want to delete a record inside the database. Is it possible to add action and how can I do that?
class WarningWidget extends BaseWidget
{
protected static ?int $sort = -2;
protected function getColumns(): int
{
return 1;
}
public static function canView():bool
{
return true;
}
protected function getStats(): array
{
return [
Stat::make('Unknown API Request','')
->description('We are having unknown API request from a unregistered domain')
->icon('heroicon-m-exclamation-triangle')
->color('danger'),
];
}
}