true]); } catch (\Exception $e) { info("I wasn't able to migrate the data."); } putenv('COMPOSER_HOME=' . __DIR__ . '/vendor/bin/composer'); $input = new ArrayInput(['command' => 'install', '--no-dev' => 'true']); $application = new Application(); $application->setAutoExit(false); $output = new BufferedOutput(); $application->run($input, $output); info(print_r($output->fetch(),1)); try { Artisan::call('optimize'); } catch (\Exception $e) { info("I wasn't able to optimize."); } info("optimized"); try { Artisan::call('view:clear'); } catch (\Exception $e) { info("I wasn't able to clear the views."); } info("view cleared"); /* For the following to work, the web user (www-data) must own all the directories */ VersionCheck::dispatch(); info("sent for version check"); echo "Done."; } }