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)

Construct a new attribute.

mixed
handle(Application $app, Closure $action)

Handle the attribute.

Details

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

Construct a new attribute.

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 57
mixed handle(Application $app, Closure $action)

Handle the attribute.

Parameters

Application $app
Closure $action

Return Value

mixed