diff --git a/src/Roots/Acorn/Console/Commands/OptimizeClearCommand.php b/src/Roots/Acorn/Console/Commands/OptimizeClearCommand.php index 72404093..4ded4994 100644 --- a/src/Roots/Acorn/Console/Commands/OptimizeClearCommand.php +++ b/src/Roots/Acorn/Console/Commands/OptimizeClearCommand.php @@ -16,12 +16,17 @@ class OptimizeClearCommand extends FoundationOptimizeClearCommand */ public function handle() { - $this->gracefulCall('view:clear'); - $this->gracefulCall('cache:clear'); - $this->gracefulCall('route:clear'); - $this->gracefulCall('config:clear'); - $this->gracefulCall('clear-compiled'); + $this->components->info('Clearing cached bootstrap files.'); - $this->info('Caches cleared successfully!'); + collect([ + 'cache' => fn () => $this->gracefulCallSilent('cache:clear') == 0, + 'compiled' => fn () => $this->gracefulCallSilent('clear-compiled') == 0, + 'config' => fn () => $this->gracefulCallSilent('config:clear') == 0, + 'events' => fn () => $this->gracefulCallSilent('event:clear') == 0, + 'routes' => fn () => $this->gracefulCallSilent('route:clear') == 0, + 'views' => fn () => $this->gracefulCallSilent('view:clear') == 0, + ])->each(fn ($task, $description) => $this->components->task($description, $task)); + + $this->newLine(); } } diff --git a/src/Roots/Acorn/Console/Commands/OptimizeCommand.php b/src/Roots/Acorn/Console/Commands/OptimizeCommand.php index 19d0f35e..538353fa 100644 --- a/src/Roots/Acorn/Console/Commands/OptimizeCommand.php +++ b/src/Roots/Acorn/Console/Commands/OptimizeCommand.php @@ -16,9 +16,15 @@ class OptimizeCommand extends FoundationOptimizeCommand */ public function handle() { - $this->gracefulCall('config:cache'); - $this->gracefulCall('route:cache'); + $this->components->info('Caching framework bootstrap, configuration, and metadata.'); - $this->info('Files cached successfully!'); + collect([ + 'config' => fn () => $this->gracefulCallSilent('config:cache') == 0, + 'events' => fn () => $this->gracefulCallSilent('event:cache') == 0, + 'routes' => fn () => $this->gracefulCallSilent('route:cache') == 0, + 'views' => fn () => $this->gracefulCallSilent('view:cache') == 0, + ])->each(fn ($task, $description) => $this->components->task($description, $task)); + + $this->newLine(); } }