class Rule

Traits

Properties

static protected array $macros

The registered string macros.

from  Macroable

Methods

static void
macro(string $name, callable $macro)

Register a custom macro.

static bool
hasMacro(string $name)

Checks if macro is registered.

static mixed
__callStatic(string $method, array $parameters)

Dynamically handle calls to the class.

mixed
__call(string $method, array $parameters)

Dynamically handle calls to the class.

static Dimensions
dimensions(array $constraints = [])

Get a dimensions constraint builder instance.

static Exists
exists(string $table, string $column = 'NULL')

Get a exists constraint builder instance.

static In
in(array|string $values)

Get an in constraint builder instance.

static NotIn
notIn(array|string $values)

Get a not_in constraint builder instance.

static Unique
unique(string $table, string $column = 'NULL')

Get a unique constraint builder instance.

Details

in Macroable at line 24
static void macro(string $name, callable $macro)

Register a custom macro.

Parameters

string $name
callable $macro

Return Value

void

in Macroable at line 35
static bool hasMacro(string $name)

Checks if macro is registered.

Parameters

string $name

Return Value

bool

in Macroable at line 49
static mixed __callStatic(string $method, array $parameters)

Dynamically handle calls to the class.

Parameters

string $method
array $parameters

Return Value

mixed

Exceptions

BadMethodCallException

in Macroable at line 71
mixed __call(string $method, array $parameters)

Dynamically handle calls to the class.

Parameters

string $method
array $parameters

Return Value

mixed

Exceptions

BadMethodCallException

at line 17
static Dimensions dimensions(array $constraints = [])

Get a dimensions constraint builder instance.

Parameters

array $constraints

Return Value

Dimensions

at line 29
static Exists exists(string $table, string $column = 'NULL')

Get a exists constraint builder instance.

Parameters

string $table
string $column

Return Value

Exists

at line 40
static In in(array|string $values)

Get an in constraint builder instance.

Parameters

array|string $values

Return Value

In

at line 51
static NotIn notIn(array|string $values)

Get a not_in constraint builder instance.

Parameters

array|string $values

Return Value

NotIn

at line 63
static Unique unique(string $table, string $column = 'NULL')

Get a unique constraint builder instance.

Parameters

string $table
string $column

Return Value

Unique