trait OptionsRelation

Options relation table trait

Methods

static void
bootOptionsRelation()

Boot trait

string|null
getOptionsType()

Get options type name

boolean
createOptions(string|null $typeName = null)

Create options

string|null
getOptionsClass()

Get option model class

string
getOptionsPrimarykey()

Get options primary key

mixed
options()

Options relation

Collection
getOptionsListAttribute()

Create options_list attribute used for better collection serialization key => value

array|null
getOption(string $key)

Get option

mixed
getOptionValue(string $key, mixed $default = null)

Get option value

Details

at line 24
static void bootOptionsRelation()

Boot trait

Return Value

void

at line 36
string|null getOptionsType()

Get options type name

Return Value

string|null

at line 47
boolean createOptions(string|null $typeName = null)

Create options

Parameters

string|null $typeName

Return Value

boolean

at line 65
string|null getOptionsClass()

Get option model class

Return Value

string|null

at line 75
string getOptionsPrimarykey()

Get options primary key

Return Value

string

at line 85
mixed options()

Options relation

Return Value

mixed

at line 95
Collection getOptionsListAttribute()

Create options_list attribute used for better collection serialization key => value

Return Value

Collection

at line 110
array|null getOption(string $key)

Get option

Parameters

string $key

Return Value

array|null

at line 132
mixed getOptionValue(string $key, mixed $default = null)

Get option value

Parameters

string $key
mixed $default

Return Value

mixed