mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-12 17:44:04 +00:00
phpstan, global_cache, resolver improvements, InitializationHelpers trait
This commit is contained in:
parent
fd65cf1754
commit
87212e5390
35 changed files with 170 additions and 231 deletions
|
|
@ -23,7 +23,7 @@ class PathTenantResolver extends Contracts\CachedTenantResolver
|
|||
/** @var Route $route */
|
||||
$route = $args[0];
|
||||
|
||||
if ($id = $route->parameter(static::$tenantParameterName)) {
|
||||
if ($id = (string) $route->parameter(static::$tenantParameterName)) {
|
||||
$route->forgetParameter(static::$tenantParameterName);
|
||||
|
||||
if ($tenant = tenancy()->find($id)) {
|
||||
|
|
@ -37,7 +37,7 @@ class PathTenantResolver extends Contracts\CachedTenantResolver
|
|||
public function getArgsForTenant(Tenant $tenant): array
|
||||
{
|
||||
return [
|
||||
[$tenant->id],
|
||||
[$tenant->getTenantKey()],
|
||||
];
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue