mirror of
https://github.com/laravel/valet.git
synced 2026-02-06 00:40:06 +01:00
Clean up DX for fetch-share-url
This commit is contained in:
@@ -52,7 +52,7 @@ public function currentTunnelUrl(?string $domain = null): string
|
||||
}
|
||||
}
|
||||
|
||||
throw new DomainException('Tunnel not established.');
|
||||
throw new DomainException('There is no Ngrok tunnel established for '.$domain.'.');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -72,6 +72,8 @@ public function findHttpTunnelUrl(array $tunnels, string $domain): ?string
|
||||
return $tunnel->public_url;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1109,6 +1109,12 @@ public function domain(?string $domain): string
|
||||
// return $parked['site'];
|
||||
// }
|
||||
|
||||
// Don't add .TLD if user already passed the string in with the TLD on the end
|
||||
if ($domain && str_contains($domain, '.'.$this->config->read()['tld'])) {
|
||||
return $domain;
|
||||
}
|
||||
|
||||
// Return either the passed domain, or the current folder name, with .TLD appended
|
||||
return ($domain ?: $this->host(getcwd())).'.'.$this->config->read()['tld'];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user