mirror of
https://github.com/laravel/valet.git
synced 2026-02-05 08:30:07 +01:00
Remove current-domain in favor of domain with no args (#61)
This commit is contained in:
committed by
Taylor Otwell
parent
fbd3c604ef
commit
0936f090b3
@@ -50,9 +50,12 @@
|
|||||||
})->descriptions('Install the Valet services');
|
})->descriptions('Install the Valet services');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Change the domain currently being used by Valet.
|
* Get or set the domain currently being used by Valet.
|
||||||
*/
|
*/
|
||||||
$app->command('domain domain', function ($domain) {
|
$app->command('domain [domain]', function ($domain = null) {
|
||||||
|
if ($domain === null) {
|
||||||
|
info(Configuration::read()['domain']);
|
||||||
|
} else {
|
||||||
DnsMasq::updateDomain(
|
DnsMasq::updateDomain(
|
||||||
Configuration::read()['domain'], $domain = trim($domain, '.')
|
Configuration::read()['domain'], $domain = trim($domain, '.')
|
||||||
);
|
);
|
||||||
@@ -60,14 +63,8 @@
|
|||||||
Configuration::updateKey('domain', $domain);
|
Configuration::updateKey('domain', $domain);
|
||||||
|
|
||||||
info('Your Valet domain has been updated to ['.$domain.'].');
|
info('Your Valet domain has been updated to ['.$domain.'].');
|
||||||
})->descriptions('Set the domain used for Valet sites');
|
}
|
||||||
|
})->descriptions('Get or set the domain used for Valet sites');
|
||||||
/**
|
|
||||||
* Get the domain currently being used by Valet.
|
|
||||||
*/
|
|
||||||
$app->command('current-domain', function () {
|
|
||||||
info(Configuration::read()['domain']);
|
|
||||||
})->descriptions('Get the current Valet domain');
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add the current working directory to the paths configuration.
|
* Add the current working directory to the paths configuration.
|
||||||
|
|||||||
2
valet
2
valet
@@ -43,7 +43,7 @@ then
|
|||||||
elif [[ "$1" = "share" ]]
|
elif [[ "$1" = "share" ]]
|
||||||
then
|
then
|
||||||
HOST="${PWD##*/}"
|
HOST="${PWD##*/}"
|
||||||
DOMAIN=$(php "$DIR/cli/valet.php" current-domain)
|
DOMAIN=$(php "$DIR/cli/valet.php" domain)
|
||||||
|
|
||||||
for linkname in ~/.valet/Sites/*; do
|
for linkname in ~/.valet/Sites/*; do
|
||||||
if [[ "$(readlink $linkname)" = "$PWD" ]]
|
if [[ "$(readlink $linkname)" = "$PWD" ]]
|
||||||
|
|||||||
Reference in New Issue
Block a user