From 5b1ded2cb549cbbb1e9476b7eb535dfc2d55f580 Mon Sep 17 00:00:00 2001 From: Kilian Trunk Date: Sun, 17 Aug 2025 10:19:02 +0200 Subject: [PATCH 1/9] feat(notifications): implement tenant-scoped broadcast notifications --- src/EclipseServiceProvider.php | 6 ++++++ src/Models/User.php | 14 ++++++++++++++ 2 files changed, 20 insertions(+) diff --git a/src/EclipseServiceProvider.php b/src/EclipseServiceProvider.php index b9ac4f4..af4f4a7 100644 --- a/src/EclipseServiceProvider.php +++ b/src/EclipseServiceProvider.php @@ -22,6 +22,7 @@ use Eclipse\Core\Providers\TelescopeServiceProvider; use Eclipse\Core\Services\Registry; use Filament\Resources\Resource; +use Filament\Support\Facades\FilamentAsset; use Filament\Tables\Columns\Column; use Illuminate\Auth\Events\Login; use Illuminate\Database\Eloquent\Model; @@ -148,6 +149,11 @@ public function boot(): void ->labels($availableLocales->pluck('native_name', 'id')->toArray()); }); + FilamentAsset::registerScriptData([ + 'user' => ['id' => auth()->id()], + 'tenant' => ['id' => Filament::getTenant()?->getKey()], + ]); + // Register health checks Health::checks([ OptimizedAppCheck::new(), diff --git a/src/Models/User.php b/src/Models/User.php index aa067f6..d519e75 100644 --- a/src/Models/User.php +++ b/src/Models/User.php @@ -183,4 +183,18 @@ public function getSettings(string $settingsClass = UserSettings::class): Settin { return $settingsClass::forUser($this->id); } + + /** + * The channels the user receives notification broadcasts on. + */ + public function receivesBroadcastNotificationsOn(): string + { + if ($host = request()?->getHost()) { + $tenantId = Site::query()->where('domain', $host)->value('id'); + + return "Eclipse.Core.Models.User.{$this->id}.tenant.{$tenantId}"; + } + + return "Eclipse.Core.Models.User.{$this->id}"; + } } From 1ec69d12b73a593ba2ee39afb6f4ba624ffd6af3 Mon Sep 17 00:00:00 2001 From: Kilian Trunk Date: Sun, 17 Aug 2025 10:20:03 +0200 Subject: [PATCH 2/9] chore(notifications): add import --- src/EclipseServiceProvider.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/EclipseServiceProvider.php b/src/EclipseServiceProvider.php index af4f4a7..4c8fbb8 100644 --- a/src/EclipseServiceProvider.php +++ b/src/EclipseServiceProvider.php @@ -21,6 +21,7 @@ use Eclipse\Core\Providers\HorizonServiceProvider; use Eclipse\Core\Providers\TelescopeServiceProvider; use Eclipse\Core\Services\Registry; +use Filament\Facades\Filament; use Filament\Resources\Resource; use Filament\Support\Facades\FilamentAsset; use Filament\Tables\Columns\Column; From a5a14379a93158babd06538f739379727c26524f Mon Sep 17 00:00:00 2001 From: Kilian Trunk Date: Sun, 17 Aug 2025 10:20:54 +0200 Subject: [PATCH 3/9] chore(notifications): add comment --- src/EclipseServiceProvider.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/EclipseServiceProvider.php b/src/EclipseServiceProvider.php index 4c8fbb8..f2b52cb 100644 --- a/src/EclipseServiceProvider.php +++ b/src/EclipseServiceProvider.php @@ -150,6 +150,7 @@ public function boot(): void ->labels($availableLocales->pluck('native_name', 'id')->toArray()); }); + // Register tenant and user IDs in Filament script data FilamentAsset::registerScriptData([ 'user' => ['id' => auth()->id()], 'tenant' => ['id' => Filament::getTenant()?->getKey()], From 441cf71440ae969473a5075c599b4c7d109a3b8e Mon Sep 17 00:00:00 2001 From: Kilian Trunk Date: Mon, 18 Aug 2025 16:16:11 +0200 Subject: [PATCH 4/9] fix: add uncommited file --- src/Services/Registry.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Services/Registry.php b/src/Services/Registry.php index 61dada0..5070a65 100644 --- a/src/Services/Registry.php +++ b/src/Services/Registry.php @@ -32,7 +32,7 @@ public static function setSite(int|Site $site): void Context::add('site', self::getSite()->id); - setPermissionsTeamId($site->id); + setPermissionsTeamId(self::getSite()->id); } /** From 3a562a2751b89513475427117fe72bb780850d28 Mon Sep 17 00:00:00 2001 From: Kilian Trunk Date: Thu, 21 Aug 2025 16:34:18 +0200 Subject: [PATCH 5/9] refactor: move tenant related code into core package --- .../tenant-scoped-notifications.blade.php | 44 +++++++++++++++++++ src/Providers/AdminPanelProvider.php | 1 + 2 files changed, 45 insertions(+) create mode 100644 resources/views/filament/partials/tenant-scoped-notifications.blade.php diff --git a/resources/views/filament/partials/tenant-scoped-notifications.blade.php b/resources/views/filament/partials/tenant-scoped-notifications.blade.php new file mode 100644 index 0000000..d350c93 --- /dev/null +++ b/resources/views/filament/partials/tenant-scoped-notifications.blade.php @@ -0,0 +1,44 @@ + + + diff --git a/src/Providers/AdminPanelProvider.php b/src/Providers/AdminPanelProvider.php index 991d04c..26a8643 100644 --- a/src/Providers/AdminPanelProvider.php +++ b/src/Providers/AdminPanelProvider.php @@ -219,6 +219,7 @@ public function register(): void parent::register(); FilamentView::registerRenderHook('panels::body.end', fn (): string => Blade::render("@vite('resources/js/app.js')")); + FilamentView::registerRenderHook('panels::body.end', fn (): string => view('eclipse::filament.partials.tenant-scoped-notifications')->render()); } /** From a6f15e0c33c11bdefee66502f7c420928400940a Mon Sep 17 00:00:00 2001 From: Kilian Trunk Date: Thu, 21 Aug 2025 16:36:23 +0200 Subject: [PATCH 6/9] refactor: refactor User model --- src/Models/User.php | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/Models/User.php b/src/Models/User.php index d519e75..6c85afb 100644 --- a/src/Models/User.php +++ b/src/Models/User.php @@ -189,12 +189,9 @@ public function getSettings(string $settingsClass = UserSettings::class): Settin */ public function receivesBroadcastNotificationsOn(): string { - if ($host = request()?->getHost()) { - $tenantId = Site::query()->where('domain', $host)->value('id'); + $host = request()?->getHost(); + $tenantId = Site::query()->where('domain', $host)->value('id'); - return "Eclipse.Core.Models.User.{$this->id}.tenant.{$tenantId}"; - } - - return "Eclipse.Core.Models.User.{$this->id}"; + return "Eclipse.Core.Models.User.{$this->id}.tenant.{$tenantId}"; } } From a4d40ed360e266b5c82aeae79647f371ee101cd4 Mon Sep 17 00:00:00 2001 From: Kilian Trunk Date: Tue, 26 Aug 2025 15:32:56 +0200 Subject: [PATCH 7/9] feat: implement tenant scoped database notifications --- ...4_28_090019_create_notifications_table.php | 4 ++ src/EclipseServiceProvider.php | 40 +++++++++++++ src/Models/DatabaseNotification.php | 56 +++++++++++++++++++ src/Models/User.php | 10 ++++ .../Channels/SiteDatabaseChannel.php | 39 +++++++++++++ src/Notifications/Concerns/ResolvesSiteId.php | 42 ++++++++++++++ src/Support/CurrentSite.php | 28 ++++++++++ 7 files changed, 219 insertions(+) create mode 100644 src/Models/DatabaseNotification.php create mode 100644 src/Notifications/Channels/SiteDatabaseChannel.php create mode 100644 src/Notifications/Concerns/ResolvesSiteId.php create mode 100644 src/Support/CurrentSite.php diff --git a/database/migrations/2025_04_28_090019_create_notifications_table.php b/database/migrations/2025_04_28_090019_create_notifications_table.php index d738032..350add8 100644 --- a/database/migrations/2025_04_28_090019_create_notifications_table.php +++ b/database/migrations/2025_04_28_090019_create_notifications_table.php @@ -15,6 +15,10 @@ public function up(): void $table->uuid('id')->primary(); $table->string('type'); $table->morphs('notifiable'); + $table->foreignId('site_id') + ->nullable() + ->constrained('sites') + ->nullOnDelete(); $table->text('data'); $table->timestamp('read_at')->nullable(); $table->timestamps(); diff --git a/src/EclipseServiceProvider.php b/src/EclipseServiceProvider.php index f2b52cb..cf7519e 100644 --- a/src/EclipseServiceProvider.php +++ b/src/EclipseServiceProvider.php @@ -13,14 +13,17 @@ use Eclipse\Core\Listeners\LogEmailToDatabase; use Eclipse\Core\Listeners\SendEmailSuccessNotification; use Eclipse\Core\Models\Locale; +use Eclipse\Core\Models\Site; use Eclipse\Core\Models\User; use Eclipse\Core\Models\User\Permission; use Eclipse\Core\Models\User\Role; +use Eclipse\Core\Notifications\Channels\SiteDatabaseChannel; use Eclipse\Core\Policies\User\RolePolicy; use Eclipse\Core\Providers\AdminPanelProvider; use Eclipse\Core\Providers\HorizonServiceProvider; use Eclipse\Core\Providers\TelescopeServiceProvider; use Eclipse\Core\Services\Registry; +use Eclipse\Core\Support\CurrentSite; use Filament\Facades\Filament; use Filament\Resources\Resource; use Filament\Support\Facades\FilamentAsset; @@ -28,10 +31,14 @@ use Illuminate\Auth\Events\Login; use Illuminate\Database\Eloquent\Model; use Illuminate\Mail\Events\MessageSent; +use Illuminate\Notifications\Channels\DatabaseChannel; +use Illuminate\Queue\Events\JobProcessed; +use Illuminate\Queue\Events\JobProcessing; use Illuminate\Support\Facades\Config; use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\Event; use Illuminate\Support\Facades\Gate; +use Illuminate\Support\Facades\Queue; use Spatie\Health\Checks\Checks\CacheCheck; use Spatie\Health\Checks\Checks\DebugModeCheck; use Spatie\Health\Checks\Checks\EnvironmentCheck; @@ -104,6 +111,10 @@ public function register(): self return new Registry; }); + $this->app->singleton(CurrentSite::class, fn () => new CurrentSite); + + $this->app->bind(DatabaseChannel::class, SiteDatabaseChannel::class); + return $this; } @@ -156,6 +167,35 @@ public function boot(): void 'tenant' => ['id' => Filament::getTenant()?->getKey()], ]); + // Add site_id to every job payload before it is pushed to the queue. + // This ensures workers always know which site context the job belongs to. + Queue::createPayloadUsing(function () { + $current = app(CurrentSite::class)->get(); + $tenantId = Filament::getTenant()?->getKey(); + $host = request()?->getHost(); + $hostResolvedId = $host ? Site::query()->where('domain', $host)->value('id') : null; + $siteId = $current ?? $tenantId ?? $hostResolvedId; + + return ['site_id' => $siteId]; + }); + + // When a job starts processing, restore the site_id from its payload + // into the global CurrentSite context so models, notifications, and logs + // all resolve the correct tenant during execution. + Event::listen(JobProcessing::class, function ($event) { + $payload = $event->job->payload(); + $siteId = $payload['site_id'] ?? null; + if ($siteId !== null) { + app(CurrentSite::class)->set((int) $siteId); + } + }); + + // After a job finishes, clear the CurrentSite context to avoid leaking + // the previous job’s tenant into the next one on the same worker. + Event::listen(JobProcessed::class, function () { + app(CurrentSite::class)->set(null); + }); + // Register health checks Health::checks([ OptimizedAppCheck::new(), diff --git a/src/Models/DatabaseNotification.php b/src/Models/DatabaseNotification.php new file mode 100644 index 0000000..821f419 --- /dev/null +++ b/src/Models/DatabaseNotification.php @@ -0,0 +1,56 @@ +where($builder->getModel()->getTable().'.site_id', $siteId); + } + + }); + } + + protected static function resolveCurrentSiteId(): ?int + { + // 1) Global context if available + if ($id = app(CurrentSite::class)->get()) { + return $id; + } + + // 2) Filament tenant if available + if ($tenantId = Filament::getTenant()?->getKey()) { + return $tenantId; + } + + // 3) Hostname mapping to a site + if ($host = request()?->getHost()) { + return Site::query()->where('domain', $host)->value('id'); + } + + return null; + } +} diff --git a/src/Models/User.php b/src/Models/User.php index 6c85afb..087c712 100644 --- a/src/Models/User.php +++ b/src/Models/User.php @@ -15,6 +15,7 @@ use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Relations\BelongsTo; use Illuminate\Database\Eloquent\Relations\HasMany; +use Illuminate\Database\Eloquent\Relations\MorphMany; use Illuminate\Database\Eloquent\SoftDeletes; use Illuminate\Foundation\Auth\User as Authenticatable; use Illuminate\Notifications\Notifiable; @@ -184,6 +185,15 @@ public function getSettings(string $settingsClass = UserSettings::class): Settin return $settingsClass::forUser($this->id); } + /** + * Override notifications relation to use site-aware notification model. + */ + public function notifications(): MorphMany + { + return $this->morphMany(DatabaseNotification::class, 'notifiable') + ->orderBy('created_at', 'desc'); + } + /** * The channels the user receives notification broadcasts on. */ diff --git a/src/Notifications/Channels/SiteDatabaseChannel.php b/src/Notifications/Channels/SiteDatabaseChannel.php new file mode 100644 index 0000000..0f349c5 --- /dev/null +++ b/src/Notifications/Channels/SiteDatabaseChannel.php @@ -0,0 +1,39 @@ +resolveSiteIdFromNotification($notification); + $resolved = $fromNotification ?? $this->resolveSiteId(); + $payload['site_id'] = $resolved; + + return $payload; + } + + /** + * Prefer an explicit site id coming from the notification instance + * (useful when dispatching from queues) before resolving ambient context. + */ + protected function resolveSiteIdFromNotification(Notification $notification): ?int + { + if (method_exists($notification, 'getSiteId')) { + return $notification->getSiteId(); + } + + return null; + } +} diff --git a/src/Notifications/Concerns/ResolvesSiteId.php b/src/Notifications/Concerns/ResolvesSiteId.php new file mode 100644 index 0000000..5f6a7b7 --- /dev/null +++ b/src/Notifications/Concerns/ResolvesSiteId.php @@ -0,0 +1,42 @@ +get()) { + return $id; + } + + // Next prefer current Filament tenant if present + $tenant = Filament::getTenant(); + if ($tenant) { + return $tenant->getKey(); + } + + // Fallback to host-based detection used elsewhere in the core + $host = request()?->getHost(); + if ($host) { + $resolved = Site::query()->where('domain', $host)->value('id'); + + return $resolved; + } + + return null; + } +} diff --git a/src/Support/CurrentSite.php b/src/Support/CurrentSite.php new file mode 100644 index 0000000..ecc16b8 --- /dev/null +++ b/src/Support/CurrentSite.php @@ -0,0 +1,28 @@ +id = $id; + } + + /** + * Get the current site identifier, or null if not set. + */ + public function get(): ?int + { + return $this->id; + } +} From 46720cb1ae52020b9960bf8f6d4107451d8566ae Mon Sep 17 00:00:00 2001 From: Kilian Trunk Date: Tue, 26 Aug 2025 15:37:04 +0200 Subject: [PATCH 8/9] fix: remove duplicate import --- src/EclipseServiceProvider.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/EclipseServiceProvider.php b/src/EclipseServiceProvider.php index 17abb68..cf7519e 100644 --- a/src/EclipseServiceProvider.php +++ b/src/EclipseServiceProvider.php @@ -25,10 +25,8 @@ use Eclipse\Core\Services\Registry; use Eclipse\Core\Support\CurrentSite; use Filament\Facades\Filament; -use Filament\Facades\Filament; use Filament\Resources\Resource; use Filament\Support\Facades\FilamentAsset; -use Filament\Support\Facades\FilamentAsset; use Filament\Tables\Columns\Column; use Illuminate\Auth\Events\Login; use Illuminate\Database\Eloquent\Model; From 68ef148558edd229c23bc23d2bec1be620f692b1 Mon Sep 17 00:00:00 2001 From: Kilian Trunk Date: Wed, 27 Aug 2025 23:43:17 +0200 Subject: [PATCH 9/9] chore: use native Context --- ...4_28_090019_create_notifications_table.php | 3 +- src/EclipseServiceProvider.php | 36 ---------------- src/Models/DatabaseNotification.php | 26 +----------- .../Channels/SiteDatabaseChannel.php | 6 +-- src/Notifications/Concerns/ResolvesSiteId.php | 42 ------------------- src/Support/CurrentSite.php | 28 ------------- 6 files changed, 6 insertions(+), 135 deletions(-) delete mode 100644 src/Notifications/Concerns/ResolvesSiteId.php delete mode 100644 src/Support/CurrentSite.php diff --git a/database/migrations/2025_04_28_090019_create_notifications_table.php b/database/migrations/2025_04_28_090019_create_notifications_table.php index 350add8..2a97d4b 100644 --- a/database/migrations/2025_04_28_090019_create_notifications_table.php +++ b/database/migrations/2025_04_28_090019_create_notifications_table.php @@ -18,7 +18,8 @@ public function up(): void $table->foreignId('site_id') ->nullable() ->constrained('sites') - ->nullOnDelete(); + ->cascadeOnUpdate() + ->cascadeOnDelete(); $table->text('data'); $table->timestamp('read_at')->nullable(); $table->timestamps(); diff --git a/src/EclipseServiceProvider.php b/src/EclipseServiceProvider.php index cf7519e..3e55adf 100644 --- a/src/EclipseServiceProvider.php +++ b/src/EclipseServiceProvider.php @@ -13,7 +13,6 @@ use Eclipse\Core\Listeners\LogEmailToDatabase; use Eclipse\Core\Listeners\SendEmailSuccessNotification; use Eclipse\Core\Models\Locale; -use Eclipse\Core\Models\Site; use Eclipse\Core\Models\User; use Eclipse\Core\Models\User\Permission; use Eclipse\Core\Models\User\Role; @@ -23,7 +22,6 @@ use Eclipse\Core\Providers\HorizonServiceProvider; use Eclipse\Core\Providers\TelescopeServiceProvider; use Eclipse\Core\Services\Registry; -use Eclipse\Core\Support\CurrentSite; use Filament\Facades\Filament; use Filament\Resources\Resource; use Filament\Support\Facades\FilamentAsset; @@ -32,13 +30,10 @@ use Illuminate\Database\Eloquent\Model; use Illuminate\Mail\Events\MessageSent; use Illuminate\Notifications\Channels\DatabaseChannel; -use Illuminate\Queue\Events\JobProcessed; -use Illuminate\Queue\Events\JobProcessing; use Illuminate\Support\Facades\Config; use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\Event; use Illuminate\Support\Facades\Gate; -use Illuminate\Support\Facades\Queue; use Spatie\Health\Checks\Checks\CacheCheck; use Spatie\Health\Checks\Checks\DebugModeCheck; use Spatie\Health\Checks\Checks\EnvironmentCheck; @@ -111,8 +106,6 @@ public function register(): self return new Registry; }); - $this->app->singleton(CurrentSite::class, fn () => new CurrentSite); - $this->app->bind(DatabaseChannel::class, SiteDatabaseChannel::class); return $this; @@ -167,35 +160,6 @@ public function boot(): void 'tenant' => ['id' => Filament::getTenant()?->getKey()], ]); - // Add site_id to every job payload before it is pushed to the queue. - // This ensures workers always know which site context the job belongs to. - Queue::createPayloadUsing(function () { - $current = app(CurrentSite::class)->get(); - $tenantId = Filament::getTenant()?->getKey(); - $host = request()?->getHost(); - $hostResolvedId = $host ? Site::query()->where('domain', $host)->value('id') : null; - $siteId = $current ?? $tenantId ?? $hostResolvedId; - - return ['site_id' => $siteId]; - }); - - // When a job starts processing, restore the site_id from its payload - // into the global CurrentSite context so models, notifications, and logs - // all resolve the correct tenant during execution. - Event::listen(JobProcessing::class, function ($event) { - $payload = $event->job->payload(); - $siteId = $payload['site_id'] ?? null; - if ($siteId !== null) { - app(CurrentSite::class)->set((int) $siteId); - } - }); - - // After a job finishes, clear the CurrentSite context to avoid leaking - // the previous job’s tenant into the next one on the same worker. - Event::listen(JobProcessed::class, function () { - app(CurrentSite::class)->set(null); - }); - // Register health checks Health::checks([ OptimizedAppCheck::new(), diff --git a/src/Models/DatabaseNotification.php b/src/Models/DatabaseNotification.php index 821f419..3f6f7ca 100644 --- a/src/Models/DatabaseNotification.php +++ b/src/Models/DatabaseNotification.php @@ -2,10 +2,9 @@ namespace Eclipse\Core\Models; -use Eclipse\Core\Support\CurrentSite; -use Filament\Facades\Filament; use Illuminate\Database\Eloquent\Builder; use Illuminate\Notifications\DatabaseNotification as BaseDatabaseNotification; +use Illuminate\Support\Facades\Context; class DatabaseNotification extends BaseDatabaseNotification { @@ -25,32 +24,11 @@ class DatabaseNotification extends BaseDatabaseNotification protected static function booted(): void { static::addGlobalScope('site', function (Builder $builder): void { - $siteId = static::resolveCurrentSiteId(); + $siteId = Context::get('site'); if ($siteId !== null) { $builder->where($builder->getModel()->getTable().'.site_id', $siteId); } - }); } - - protected static function resolveCurrentSiteId(): ?int - { - // 1) Global context if available - if ($id = app(CurrentSite::class)->get()) { - return $id; - } - - // 2) Filament tenant if available - if ($tenantId = Filament::getTenant()?->getKey()) { - return $tenantId; - } - - // 3) Hostname mapping to a site - if ($host = request()?->getHost()) { - return Site::query()->where('domain', $host)->value('id'); - } - - return null; - } } diff --git a/src/Notifications/Channels/SiteDatabaseChannel.php b/src/Notifications/Channels/SiteDatabaseChannel.php index 0f349c5..035aa7a 100644 --- a/src/Notifications/Channels/SiteDatabaseChannel.php +++ b/src/Notifications/Channels/SiteDatabaseChannel.php @@ -2,14 +2,12 @@ namespace Eclipse\Core\Notifications\Channels; -use Eclipse\Core\Notifications\Concerns\ResolvesSiteId; use Illuminate\Notifications\Channels\DatabaseChannel; use Illuminate\Notifications\Notification; +use Illuminate\Support\Facades\Context; class SiteDatabaseChannel extends DatabaseChannel { - use ResolvesSiteId; - /** * Build the payload stored in the notifications table and * append the current site id so rows are tenant-aware. @@ -18,7 +16,7 @@ protected function buildPayload($notifiable, Notification $notification): array { $payload = parent::buildPayload($notifiable, $notification); $fromNotification = $this->resolveSiteIdFromNotification($notification); - $resolved = $fromNotification ?? $this->resolveSiteId(); + $resolved = $fromNotification ?? Context::get('site'); $payload['site_id'] = $resolved; return $payload; diff --git a/src/Notifications/Concerns/ResolvesSiteId.php b/src/Notifications/Concerns/ResolvesSiteId.php deleted file mode 100644 index 5f6a7b7..0000000 --- a/src/Notifications/Concerns/ResolvesSiteId.php +++ /dev/null @@ -1,42 +0,0 @@ -get()) { - return $id; - } - - // Next prefer current Filament tenant if present - $tenant = Filament::getTenant(); - if ($tenant) { - return $tenant->getKey(); - } - - // Fallback to host-based detection used elsewhere in the core - $host = request()?->getHost(); - if ($host) { - $resolved = Site::query()->where('domain', $host)->value('id'); - - return $resolved; - } - - return null; - } -} diff --git a/src/Support/CurrentSite.php b/src/Support/CurrentSite.php deleted file mode 100644 index ecc16b8..0000000 --- a/src/Support/CurrentSite.php +++ /dev/null @@ -1,28 +0,0 @@ -id = $id; - } - - /** - * Get the current site identifier, or null if not set. - */ - public function get(): ?int - { - return $this->id; - } -}