mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-12 15:34:03 +00:00
Forget tenant parameter when a tenant is resolved from cache in PathTenantResolver (fix #1174)
This commit is contained in:
parent
5fe8825f13
commit
8db27a358e
1 changed files with 8 additions and 0 deletions
|
|
@ -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 [
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue