&1', $output, $returnVar); // Output the result of the Composer command if ($returnVar === 0) { $this->info("Composer install ran successfully:\n" . implode("\n", $output)); } else { $this->error("Composer install failed:\n" . implode("\n", $output)); } // run command RestartSupervisor $output = []; $returnVar = null; exec('php artisan supervisor:restart 2>&1', $output, $returnVar); // output result of command RestartSupervisor if ($returnVar === 0) { $this->info("Restart Supervisor ran successfully:\n" . implode("\n", $output)); } else { $this->error("Restart Supervisor failed:\n" . implode("\n", $output)); } $this->info("All caches have been cleared."); } }