class EnsureFeaturesAreActive

Properties

static protected Closure|null $respondUsing

The callback that generates responses for failed feature checks.

Methods

mixed
handle(Request $request, Closure $next, BackedEnum|UnitEnum|string ...$features)

Handle the incoming request.

static string
using(BackedEnum|UnitEnum|string ...$features)

Specify the features for the middleware.

static void
whenInactive(Closure|null $callback)

Specify a callback that should be used to generate responses for failed feature checks.

static void
flushState()

Flush all static state.

Details

at line 26
mixed handle(Request $request, Closure $next, BackedEnum|UnitEnum|string ...$features)

Handle the incoming request.

Parameters

Request $request
Closure $next
BackedEnum|UnitEnum|string ...$features

Return Value

mixed

at line 48
static string using(BackedEnum|UnitEnum|string ...$features)

Specify the features for the middleware.

Parameters

BackedEnum|UnitEnum|string ...$features

Return Value

string

at line 59
static void whenInactive(Closure|null $callback)

Specify a callback that should be used to generate responses for failed feature checks.

The callback persists in a static property for the worker lifetime and affects every subsequent request.

Parameters

Closure|null $callback

Return Value

void

at line 68
static void flushState()

Flush all static state.

Return Value

void