Tenant-Aware Setup
MediaZone works with Filament's built-in multi-tenancy. The key requirement is that all edit URLs are generated using Filament's resource URL builder rather than Laravel's route() helper, so the current tenant context is included automatically.
How edit URLs are resolved
getEditUrl() in both MediaListing and ListMedia uses:
Filament's getUrl() reads the current tenant from the panel context and injects it into the route parameters automatically. You do not need to pass the tenant manually.
Scoping media to a tenant
The package does not add tenant scoping to the Media model by default. To scope the media library to the current tenant, override getMediaModel() in a custom subclass of ListMedia or add a global scope to your custom model.
Global scope example
Assigning tenant on create
To automatically assign the current tenant when a media record is created:
Tenant-aware resource
If you have registered the MediaResource under a tenanted panel, the resource's navigation and URLs will include the tenant slug automatically — no extra configuration is required.