Example #1
0
} else {
    require __DIR__ . '/../../../autoload.php';
}
use Silly\Application;
use Illuminate\Container\Container;
/**
 * Create the application.
 */
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');