info('🚀 Starting Full System Optimization...'); $steps = [ 'Clearing Cache...' => 'cache:clear', 'Caching Configuration...' => 'config:cache', 'Caching Routes...' => 'route:cache', 'Caching Views...' => 'view:cache', 'Caching Events...' => 'event:cache', 'Pruning Database Logs...' => 'model:prune', ]; $bar = $this->output->createProgressBar(count($steps)); $bar->start(); foreach ($steps as $label => $command) { $this->line("\n".$label); try { Artisan::call($command); $this->info("✓ Done: {$command}"); } catch (\Exception $e) { $this->error("✗ Failed: {$command}. Error: ".$e->getMessage()); } $bar->advance(); } $bar->finish(); $this->line("\n"); $this->info('✨ System Optimization Complete! Everything is running at peak performance.'); return 0; } }