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']); } DnsMasq::updateDomain($oldDomain = Configuration::read()['domain'], $domain = trim($domain, '.')); Configuration::updateKey('domain', $domain); Site::resecureForNewDomain($oldDomain, $domain); PhpFpm::restart(); Caddy::restart(); info('Your Valet domain has been updated to [' . $domain . '].'); })->descriptions('Get or set the domain used for Valet sites'); /** * Add the current working directory to the paths configuration. */ $app->command('park', function () { Configuration::addPath(getcwd()); info("This directory has been added to Valet's paths."); })->descriptions('Register the current working directory with Valet'); /** * Remove the current working directory to the paths configuration. */