1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2025-12-12 20:14:03 +00:00

Forget tenant parameter when a tenant is resolved from cache in PathTenantResolver (fix #1174)

This commit is contained in:
Samuel Štancl 2024-01-27 22:55:59 +01:00
parent 5fe8825f13
commit 8db27a358e

View file

@ -37,6 +37,14 @@ class PathTenantResolver extends Contracts\CachedTenantResolver
throw new TenantCouldNotBeIdentifiedByPathException($id); throw new TenantCouldNotBeIdentifiedByPathException($id);
} }
public function resolved(Tenant $tenant, ...$args): void
{
/** @var Route $route */
$route = $args[0];
$route->forgetParameter(static::$tenantParameterName);
}
public function getArgsForTenant(Tenant $tenant): array public function getArgsForTenant(Tenant $tenant): array
{ {
return [ return [