1
0
mirror of https://github.com/laravel/valet.git synced 2026-02-04 16:10:08 +01:00

Change valet domain command to valet tld

Fixes #144
".dev" is really a TLD, not a "domain" in the conventional sense.
Changing the command to `valet tld` more accurately reflects the purpose of the command (to set or get the configured TLD served by Valet)
This commit is contained in:
Chris Brown
2016-12-09 10:31:23 -05:00
parent 9560909d34
commit bd5c998019
3 changed files with 8 additions and 8 deletions

View File

@@ -120,7 +120,7 @@ function createDomainResolver($domain)
}
/**
* Update the domain used by DnsMasq.
* Update the domain (TLD) used by DnsMasq.
*
* @param string $oldDomain
* @param string $newDomain

View File

@@ -130,9 +130,9 @@ function ($exitCode, $outputMessage) {
*/
function rewriteSecureNginxFiles()
{
$domain = $this->configuration->read()['domain'];
$tld = $this->configuration->read()['tld'];
$this->site->resecureForNewDomain($domain, $domain);
$this->site->resecureForNewTld($tld, $tld);
}
/**

View File

@@ -136,13 +136,13 @@ function pruneLinks()
}
/**
* Resecure all currently secured sites with a fresh domain.
* Resecure all currently secured sites with a fresh tld.
*
* @param string $oldDomain
* @param string $domain
* @param string $oldTld
* @param string $tld
* @return void
*/
function resecureForNewDomain($oldDomain, $domain)
function resecureForNewTld($oldTld, $tld)
{
if (! $this->files->exists($this->certificatesPath())) {
return;
@@ -155,7 +155,7 @@ function resecureForNewDomain($oldDomain, $domain)
}
foreach ($secured as $url) {
$this->secure(str_replace('.'.$oldDomain, '.'.$domain, $url));
$this->secure(str_replace('.'.$oldTld, '.'.$tld, $url));
}
}