mirror of
https://github.com/laravel/valet.git
synced 2026-02-04 16:10:08 +01:00
Update cli/Valet/Site.php
Co-authored-by: Matt Stauffer <mattstauffer@users.noreply.github.com>
This commit is contained in:
@@ -208,9 +208,9 @@ public function getSiteUrl($directory)
|
||||
$directory = $this->host(getcwd());
|
||||
}
|
||||
|
||||
$length = strlen('.'.$tld);
|
||||
if (substr($directory, -$length) === '.'.$tld) {
|
||||
$directory = substr($directory, 0, -$length); // Remove .tld from sitename if it was provided
|
||||
// Remove .tld from the end of sitename if it was provided
|
||||
if (ends_with($directory, '.'.$tld) {
|
||||
$directory = substr($directory, 0, -(strlen('.'.$tld)));
|
||||
}
|
||||
|
||||
if (! $this->parked()->merge($this->links())->where('site', $directory)->count() > 0) {
|
||||
|
||||
Reference in New Issue
Block a user