Attribute
class Attribute extends Model implements Attribute
Properties
boolean | $timestamps | Indicates if the model should be timestamped. | |
array | $attributes | array$attributes |
Methods
Create new attribute instance.
Create new AttributeBag.
Get the meta attribute value.
Get the meta attribute key.
Set value of the meta attribute.
Allow custom table name for meta attributes via config.
Set custom table for the meta attributes. Allows doing it only once in order to mimic protected behaviour, most likely in the service provider, which in turn gets the table name from configuration.
Handle casting value to string.
Handle dynamic casting to string.
Details
at line 81
__construct(string|array $key = null, mixed $value = null)
Create new attribute instance.
at line 134
AttributeBag
newBag(array $models = array())
Create new AttributeBag.
at line 144
mixed
getValue()
Get the meta attribute value.
at line 158
string
getMetaKey()
Get the meta attribute key.
at line 216
setValue(mixed $value)
Set value of the meta attribute.
at line 326
string
getTable()
Allow custom table name for meta attributes via config.
at line 338
static
setCustomTable(string $table)
Set custom table for the meta attributes. Allows doing it only once in order to mimic protected behaviour, most likely in the service provider, which in turn gets the table name from configuration.
at line 350
string
castToString()
Handle casting value to string.
at line 370
string
__toString()
Handle dynamic casting to string.