Example #1
0
    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.
 */
$app->command('forget', function () {
    Configuration::removePath(getcwd());
    info("This directory has been removed from Valet's paths.");
})->descriptions('Remove the current working directory from Valet\'s list of paths');
/**
 * Remove the current working directory to the paths configuration.
 */
$app->command('status', function () {
    passthru('systemctl status caddy.service php7.0-fpm.service');
})->descriptions('View Valet service status');
/**
 * Reload systemd services
 */
$app->command('reload', function () {
    passthru('systemctl daemon-reload');
})->descriptions('Reload Valet services');
/**
Example #2
0
    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 [path]', function ($path = null) {
    Configuration::addPath($path ?: getcwd());
    info(($path === null ? "This" : "The [{$path}]") . " directory has been added to Valet's paths.");
})->descriptions('Register the current working (or specified) directory with Valet');
/**
 * Remove the current working directory from the paths configuration.
 */
$app->command('forget [path]', function ($path = null) {
    Configuration::removePath($path ?: getcwd());
    info(($path === null ? "This" : "The [{$path}]") . " directory has been removed from Valet's paths.");
})->descriptions('Remove the current working (or specified) directory from Valet\'s list of paths');
/**
 * Register a symbolic link with Valet.
 */
$app->command('link [name]', function ($name) {
    $linkPath = Site::link(getcwd(), $name = $name ?: basename(getcwd()));
    info('A [' . $name . '] symbolic link has been created in [' . $linkPath . '].');
})->descriptions('Link the current working directory to Valet');
/**
 * Display all of the registered symbolic links.
 */
$app->command('links', function () {
    passthru('ls -la ' . VALET_HOME_PATH . '/Sites');
})->descriptions('Display all of the registered Valet links');