1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2026-02-05 18:34:04 +00:00

Refactor checking host is subdomain

This commit is contained in:
Süleyman ÖZEV 2023-03-24 18:11:02 +03:00 committed by GitHub
parent d4a99011e6
commit 5fa8543279
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -27,6 +27,6 @@ class InitializeTenancyByDomainOrSubdomain
protected function isSubdomain(string $hostname): bool
{
return Str::endsWith($hostname, config('tenancy.central_domains'));
return ! Str::of($hostname)->replace(config('tenancy.central_domains'), '')->isEmpty();
}
}