ModuleMiddleware
extends Middleware
in package
Middleware for gating routes by feature module.
Checks if the current business has a specific module enabled. Used with parameterized syntax: 'ModuleMiddleware:analytics'
Tags
Table of Contents
Properties
- $module : string
Methods
- __construct() : mixed
- Create middleware with the required module name.
- handle() : bool
- Handle the request by checking module access.
Properties
$module
private
string
$module
The module name to check
Methods
__construct()
Create middleware with the required module name.
public
__construct([string $module = '' ]) : mixed
Parameters
- $module : string = ''
-
Module name (e.g., 'analytics', 'reservations')
handle()
Handle the request by checking module access.
public
handle([array<string|int, mixed> $params = [] ]) : bool
Parameters
- $params : array<string|int, mixed> = []
-
Route parameters