diff --git a/src/Console/PurgeCommand.php b/src/Console/PurgeCommand.php index e42a6ad0d..26a35916b 100644 --- a/src/Console/PurgeCommand.php +++ b/src/Console/PurgeCommand.php @@ -40,7 +40,9 @@ public function handle() Passport::authCode()->where('revoked', 1)->orWhereDate('expires_at', '<', $expired)->delete(); Passport::refreshToken()->where('revoked', 1)->orWhereDate('expires_at', '<', $expired)->delete(); - $this->info('Purged revoked items and items expired for more than seven days.'); + $this->option('hours') + ? $this->info('Purged revoked items and items expired for more than '.$this->option('hours').' hours.') + : $this->info('Purged revoked items and items expired for more than seven days.'); } elseif ($this->option('revoked')) { Passport::token()->where('revoked', 1)->delete(); Passport::authCode()->where('revoked', 1)->delete(); @@ -52,7 +54,9 @@ public function handle() Passport::authCode()->whereDate('expires_at', '<', $expired)->delete(); Passport::refreshToken()->whereDate('expires_at', '<', $expired)->delete(); - $this->info('Purged items expired for more than seven days.'); + $this->option('hours') + ? $this->info('Purged items expired for more than '.$this->option('hours').' hours.') + : $this->info('Purged items expired for more than seven days.'); } } }