mirror of
https://github.com/laravel/valet.git
synced 2026-02-04 08:10:07 +01:00
Merge branch 'feature/support-parked-domains' of https://github.com/antonioribeiro/valet into antonioribeiro-feature/support-parked-domains
This commit is contained in:
@@ -1073,6 +1073,24 @@ public function certificatesPath($url = null, $extension = null)
|
||||
return $this->valetHomePath().'/Certificates'.$url.$extension;
|
||||
}
|
||||
|
||||
/**
|
||||
* Make the domain name based on parked domains or the internal TLD.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function domain($domain)
|
||||
{
|
||||
if ($this->parked()->pluck('site')->contains($domain)) {
|
||||
return $domain;
|
||||
}
|
||||
|
||||
if ($parked = $this->parked()->where('path', getcwd())->first()) {
|
||||
return $parked['site'];
|
||||
}
|
||||
|
||||
return ($domain ?: $this->host(getcwd())).'.'.$this->config->read()['tld'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Replace Loopback configuration line in Valet site configuration file contents.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user