Assign the existing site to one landlord so stommer.info can run tenancy.

Seebad 0.3 stays in this release. With a single landlord every host still reaches the default website.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
LarsandCursor committed 2026-10-23 12:00:11 +02:00
1 parent d9e52c4789
commit 8ebc1a3878
93 files changed
+2506 -112

No files matched your search

+14 -2
View File
@@ -4,6 +4,7 @@
use App\Models\ContentBlock;
use App\Models\Photo;
use App\Tenancy\TenantContext;
use Filament\Forms\Components\RichEditor\RichContentRenderer;
use Illuminate\Support\Facades\Cache;
use Illuminate\Support\HtmlString;
@@ -54,7 +55,7 @@ public static function save(array $values): void
ContentBlock::updateOrCreate(['key' => $key], ['value' => $value]);
}
Cache::forget(self::CACHE_KEY);
Cache::forget(self::cacheKey());
}
/**
@@ -84,6 +85,17 @@ private static function definition(string $key): array
*/
private static function stored(): array
{
return Cache::rememberForever(self::CACHE_KEY, fn (): array => ContentBlock::pluck('value', 'key')->all());
return Cache::rememberForever(self::cacheKey(), fn (): array => ContentBlock::pluck('value', 'key')->all());
}
/**
* Stored texts are cached per landlord. Without a current landlord the key stays the historical one,
* which only happens before a request has chosen a website.
*/
private static function cacheKey(): string
{
$tenantId = app(TenantContext::class)->id();
return $tenantId === null ? self::CACHE_KEY : self::CACHE_KEY.'.'.$tenantId;
}
}