From b0f5d2647ff86dd2ea448d490ec78b915e52b2d2 Mon Sep 17 00:00:00 2001 From: lukinovec Date: Mon, 24 Jun 2024 14:36:43 +0200 Subject: [PATCH] Add note about TenantAssetsController --- source/docs/v3/integrations/nova.blade.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/source/docs/v3/integrations/nova.blade.md b/source/docs/v3/integrations/nova.blade.md index ec23b78..eacd9d1 100644 --- a/source/docs/v3/integrations/nova.blade.md +++ b/source/docs/v3/integrations/nova.blade.md @@ -73,3 +73,16 @@ Avatar::make('Avatar', 'photo') ->thumbnail(fn ($value, $disk) => tenant_asset($value)), ->preview(fn ($value, $disk) => tenant_asset($value)), ``` + +Important: make sure to update `TenantAssetsController::$tenancyMiddleware` to the identification middleware of your choice. + +E.g. if you're using InitializeByDomainOrSubdomain in your app, set `TenantAssetsController::$tenancyMiddleware` to InitializeByDomainOrSubdomain in TenancyServiceProvider's `boot()` method: + +```php +// In App\Providers\TenancyServiceProvider +public function boot(): void +{ + // ... + TenantAssetsController::$tenancyMiddleware = InitializeTenancyByDomainOrSubdomain::class; +} +```