mirror of
https://github.com/archtechx/tenancy.git
synced 2026-02-05 19:14:03 +00:00
change the variable name and undo the code style
This commit is contained in:
parent
7653fefefd
commit
65aecb9139
1 changed files with 4 additions and 4 deletions
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
declare (strict_types = 1);
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Stancl\Tenancy\Features;
|
||||
|
||||
|
|
@ -13,7 +13,7 @@ use Stancl\Tenancy\Tenancy;
|
|||
|
||||
class UniversalRoutes implements Feature
|
||||
{
|
||||
public static $middlewareUniversalName = 'universal';
|
||||
public static $middlewareGroup = 'universal';
|
||||
|
||||
public static $identificationMiddlewares = [
|
||||
Middleware\InitializeTenancyByDomain::class,
|
||||
|
|
@ -24,7 +24,7 @@ class UniversalRoutes implements Feature
|
|||
{
|
||||
foreach (static::$identificationMiddlewares as $middleware) {
|
||||
$middleware::$onFail = function ($exception, $request, $next) {
|
||||
if (static::routeHasMiddleware($request->route(), static::$middlewareUniversalName)) {
|
||||
if (static::routeHasMiddleware($request->route(), static::$middlewareGroup)) {
|
||||
return $next($request);
|
||||
}
|
||||
|
||||
|
|
@ -43,7 +43,7 @@ class UniversalRoutes implements Feature
|
|||
// groups have the searhced middleware group inside them
|
||||
$middlewareGroups = Router::getMiddlewareGroups();
|
||||
foreach ($route->gatherMiddleware() as $inner) {
|
||||
if (!$inner instanceof Closure && isset($middlewareGroups[$inner]) && in_array($middleware, $middlewareGroups[$inner], true)) {
|
||||
if (! $inner instanceof Closure && isset($middlewareGroups[$inner]) && in_array($middleware, $middlewareGroups[$inner], true)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue