class NestedSet

Constants

LFT

The name of default lft column.

RGT

The name of default rgt column.

PARENT_ID

The name of default parent id column.

DEPTH

The name of default depth column.

Properties

static protected array<class-string, bool> $nodeClasses

Cached node-trait membership by concrete class.

Methods

static void
columns(Blueprint $table, array $scopes = [])

Add bigint nested set columns and indexes to the table.

static void
integerColumns(Blueprint $table, array $scopes = [])

Add integer nested set columns and indexes to the table.

static void
uuidColumns(Blueprint $table, array $scopes = [])

Add UUID nested set columns and indexes to the table.

static void
ulidColumns(Blueprint $table, array $scopes = [])

Add ULID nested set columns and indexes to the table.

static void
dropColumns(Blueprint $table, array $scopes = [])

Drop nested set columns and indexes.

static array
getDefaultColumns()

Get a list of default columns.

static bool
isNode(mixed $node)

Determine whether the value uses the node trait.

static string
structuralIdentity(Model $model)

Get the model's logical nested set table identity.

static string
structuralDescription(Model $model)

Describe the model's logical nested set table.

static string
structuralConnectionName(Model $model)

Get the model's logical connection name.

static void
addBoundsAndDepth(Blueprint $table)

Add the common structural columns to the table.

static void
addIndexes(Blueprint $table, array $scopes)

Add nested set indexes to the table.

static void
flushState()

Flush all static state.

Details

at line 43
static void columns(Blueprint $table, array $scopes = [])

Add bigint nested set columns and indexes to the table.

Parameters

Blueprint $table
array $scopes

Return Value

void

at line 53
static void integerColumns(Blueprint $table, array $scopes = [])

Add integer nested set columns and indexes to the table.

Parameters

Blueprint $table
array $scopes

Return Value

void

at line 63
static void uuidColumns(Blueprint $table, array $scopes = [])

Add UUID nested set columns and indexes to the table.

Parameters

Blueprint $table
array $scopes

Return Value

void

at line 73
static void ulidColumns(Blueprint $table, array $scopes = [])

Add ULID nested set columns and indexes to the table.

Parameters

Blueprint $table
array $scopes

Return Value

void

at line 83
static void dropColumns(Blueprint $table, array $scopes = [])

Drop nested set columns and indexes.

Parameters

Blueprint $table
array $scopes

Return Value

void

at line 94
static array getDefaultColumns()

Get a list of default columns.

Return Value

array

at line 102
static bool isNode(mixed $node)

Determine whether the value uses the node trait.

Parameters

mixed $node

Return Value

bool

at line 117
static string structuralIdentity(Model $model)

Get the model's logical nested set table identity.

Parameters

Model $model

Return Value

string

at line 127
static string structuralDescription(Model $model)

Describe the model's logical nested set table.

Parameters

Model $model

Return Value

string

at line 139
static protected string structuralConnectionName(Model $model)

Get the model's logical connection name.

Parameters

Model $model

Return Value

string

at line 151
static protected void addBoundsAndDepth(Blueprint $table)

Add the common structural columns to the table.

Parameters

Blueprint $table

Return Value

void

at line 161
static protected void addIndexes(Blueprint $table, array $scopes)

Add nested set indexes to the table.

Parameters

Blueprint $table
array $scopes

Return Value

void

at line 171
static void flushState()

Flush all static state.

Return Value

void