true]); } 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."); } /* For the following to work, the web user (www-data) must own all the directories */ putenv('COMPOSER_HOME=' . __DIR__ . '/vendor/bin/composer'); $input = new ArrayInput(array('command' => 'install', '--no-dev' => 'true')); $application = new Application(); $application->setAutoExit(false); $application->run($input); echo "Done."; } }