'install')); $application = new Application(); //$application->setAutoExit(false); // prevent `$application->run` method from exitting the script $application->run($input); try { Artisan::call('migrate'); } catch (Exception $e) { \Log::error("I wasn't able to migrate the data."); } try { Artisan::call('optimize'); } catch (Exception $e) { \Log::error("I wasn't able to optimize."); } try { Artisan::call('queue:restart'); } catch (Exception $e) { \Log::error("I wasn't able to restart the queue"); } } }