mirror of
https://github.com/archtechx/tenancy.git
synced 2026-02-05 18:34:04 +00:00
TenancyUrlGenerator: add a check for queryParameterName being null
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
parent
fee265388f
commit
3b1a126f29
1 changed files with 5 additions and 3 deletions
|
|
@ -187,10 +187,12 @@ class TenancyUrlGenerator extends UrlGenerator
|
||||||
{
|
{
|
||||||
if (tenant() && static::$passTenantParameterToRoutes) {
|
if (tenant() && static::$passTenantParameterToRoutes) {
|
||||||
if (static::$passQueryParameter) {
|
if (static::$passQueryParameter) {
|
||||||
return array_merge($parameters, [RequestDataTenantResolver::queryParameterName() => RequestDataTenantResolver::payloadValue(tenant())]);
|
$queryParameterName = RequestDataTenantResolver::queryParameterName();
|
||||||
} else {
|
if ($queryParameterName !== null) {
|
||||||
return array_merge($parameters, [PathTenantResolver::tenantParameterName() => PathTenantResolver::tenantParameterValue(tenant())]);
|
return array_merge($parameters, [$queryParameterName => RequestDataTenantResolver::payloadValue(tenant())]);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
return array_merge($parameters, [PathTenantResolver::tenantParameterName() => PathTenantResolver::tenantParameterValue(tenant())]);
|
||||||
} else {
|
} else {
|
||||||
return $parameters;
|
return $parameters;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue