Revert "Management UI"

This reverts commit f11404c574.
This commit is contained in:
Stefan Lazic committed 2026-09-05 09:31:59 +01:00
1 parent 3e052e56b1
commit 33fb14b773
29 files changed
+94 -881

No files matched your search

-32
View File
@@ -1,32 +0,0 @@
<?php
namespace App\Services\Tenant;
use InvalidArgumentException;
final class DomainNormalizer
{
public function normalize(string $value): string
{
$value = trim($value);
if ($value === '') {
throw new InvalidArgumentException('A domain is required.');
}
$candidate = str_contains($value, '://') ? $value : 'http://'.$value;
$host = parse_url($candidate, PHP_URL_HOST);
if (! is_string($host) || $host === '' || str_contains($host, '/')) {
throw new InvalidArgumentException('Enter a valid hostname, such as book.example.com.');
}
$host = strtolower(rtrim($host, '.'));
if (strlen($host) > 253 || preg_match('/\s/', $host) || ! preg_match('/^[a-z0-9.-]+$/', $host)) {
throw new InvalidArgumentException('Enter a valid hostname, such as book.example.com.');
}
return $host;
}
}
-5
View File
@@ -13,11 +13,6 @@ final class TenantContext
$this->business = $business;
}
public function forget(): void
{
$this->business = null;
}
public function business(): ?Business
{
return $this->business;