mutateFormDataUsing(function (array $data): array { $token = 'PAYM' . bin2hex(random_bytes(32)); $data['token'] = hash('sha256', $token); $data['type'] = 'admin'; Notification::make() ->title('API Token Created') ->body(Str::markdown("Here is your new API token. Please copy it now, as it will not be shown again.\nToken: ```" . $token . '```')) ->icon('heroicon-o-key') ->success() ->persistent() ->send(); return $data; }), ]; } }