record; Activity::event('server:schedule.update') ->property('name', $schedule->name) ->log(); } protected function mutateFormDataBeforeSave(array $data): array { $data['next_run_at'] = ScheduleResource::getNextRun( $data['cron_minute'], $data['cron_hour'], $data['cron_day_of_month'], $data['cron_month'], $data['cron_day_of_week'] ); return $data; } /** @return array */ protected function getDefaultHeaderActions(): array { return [ Actions\DeleteAction::make() ->hiddenLabel()->iconButton()->iconSize(IconSize::Large) ->icon('tabler-trash') ->tooltip('Delete Schedule') ->after(function ($record) { Activity::event('server:schedule.delete') ->property('name', $record->name) ->log(); }), ExportScheduleAction::make() ->hiddenLabel()->iconButton()->iconSize(IconSize::Large) ->icon('tabler-download') ->tooltip('Export Schedule'), $this->getSaveFormAction()->formId('form') ->hiddenLabel()->iconButton()->iconSize(IconSize::Large) ->icon('tabler-device-floppy') ->tooltip('Save Schedule'), $this->getCancelFormAction()->formId('form') ->hiddenLabel()->iconButton()->iconSize(IconSize::Large) ->icon('tabler-cancel') ->tooltip('Cancel'), ]; } public function getBreadcrumbs(): array { return []; } protected function getFormActions(): array { return []; } }