final class RequiresDatabase implements Actionable

Skips the test if the required database driver is not configured.

Properties

bool|null $default

Determine if currently the default connection.

Methods

__construct(array|string $driver, string|null $versionRequirement = null, string|null $connection = null, bool|null $default = null)

No description

mixed
handle(Application $app, Closure $action)

Handle the attribute.

Details

at line 33
__construct(array|string $driver, string|null $versionRequirement = null, string|null $connection = null, bool|null $default = null)

No description

Parameters

array|string $driver

The required database driver(s)

string|null $versionRequirement

Optional version requirement (e.g., ">=8.0")

string|null $connection

Optional connection name to check

bool|null $default

Whether to check the default connection

at line 55
mixed handle(Application $app, Closure $action)

Handle the attribute.

Parameters

Application $app
Closure $action

Return Value

mixed