Skip to content

Commit

Permalink
Forget tenant parameter when a tenant is resolved from cache in PathT…
Browse files Browse the repository at this point in the history
…enantResolver (fix #1174)
  • Loading branch information
stancl committed Jan 27, 2024
1 parent 5fe8825 commit 8db27a3
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/Resolvers/PathTenantResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,14 @@ public function resolveWithoutCache(...$args): Tenant
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
{
return [
Expand Down

0 comments on commit 8db27a3

Please sign in to comment.