mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-13 21:04:03 +00:00
misc improvements - stronger types, exception refactor
This commit is contained in:
parent
ddc7cf49c3
commit
55d0a9ab87
34 changed files with 179 additions and 209 deletions
|
|
@ -13,9 +13,10 @@ use Stancl\Tenancy\Tenancy;
|
|||
|
||||
class UniversalRoutes implements Feature
|
||||
{
|
||||
public static $middlewareGroup = 'universal';
|
||||
public static string $middlewareGroup = 'universal';
|
||||
|
||||
public static $identificationMiddlewares = [
|
||||
// todo docblock
|
||||
public static array $identificationMiddlewares = [
|
||||
Middleware\InitializeTenancyByDomain::class,
|
||||
Middleware\InitializeTenancyBySubdomain::class,
|
||||
];
|
||||
|
|
@ -39,7 +40,7 @@ class UniversalRoutes implements Feature
|
|||
}
|
||||
}
|
||||
|
||||
public static function routeHasMiddleware(Route $route, $middleware): bool
|
||||
public static function routeHasMiddleware(Route $route, string $middleware): bool
|
||||
{
|
||||
if (in_array($middleware, $route->middleware(), true)) {
|
||||
return true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue