true]); } catch (\Exception $e) { nlog("I wasn't able to migrate the data."); } nlog("finished migrating"); $output = []; exec('vendor/bin/composer install --no-dev -o', $output); info(print_r($output,1)); nlog($output); nlog("finished running composer install "); try { Artisan::call('optimize'); } catch (\Exception $e) { nlog("I wasn't able to optimize."); } nlog("optimized"); try { Artisan::call('view:clear'); } catch (\Exception $e) { nlog("I wasn't able to clear the views."); } nlog("view cleared"); /* For the following to work, the web user (www-data) must own all the directories */ VersionCheck::dispatch(); nlog("sent for version check"); // echo "Done."; } }