Container::setInstance(new Container()); $version = '1.1.16'; $app = new Application('Laravel Valet', $version); /** * Prune missing directories and symbolic links on every command. */ if (is_dir(VALET_HOME_PATH)) { Configuration::prune(); Site::pruneLinks(); } /** * Allow Valet to be run more conveniently by allowing the Node proxy to run password-less sudo. */ $app->command('install', function () { Caddy::stop(); Configuration::install(); Caddy::install(); PhpFpm::install(); DnsMasq::install(); Caddy::restart(); Valet::symlinkToUsersBin(); Valet::createSudoersEntry(); passthru('/bin/bash ' . __DIR__ . '/scripts/install-packages.sh'); output(PHP_EOL . '<info>Valet installed successfully!</info>'); })->descriptions('Install the Valet services'); /** * Get or set the domain currently being used by Valet. */ $app->command('domain [domain]', function ($domain = null) { if ($domain === null) { return info(Configuration::read()['domain']);