Method |
Description |
|
addHintedAttributes ( ) |
Schema free data architecture give us tons of flexibility (yay) but
makes it hard to inspect a structure and build getters/setters. |
|
flagJsonAttribute ( string $key, string $col ) |
Record that a given JSON element is found on a particular column. |
|
getDirty ( $includeJson = false ) : array |
Add json attributes to the list of things that have changed (when
they've changed). |
|
getMutatedAttributes ( ) : array |
Include the JSON attributes in the list of mutated attributes for a
given instance. |
|
hasGetMutator ( string $key ) : boolean |
Include JSON column in the list of attributes that have a get mutator. |
|
hintJsonStructure ( string $column, string $structure ) |
Sets a hint for a given column. |
|
inspectJsonColumns ( ) |
Decodes each of the declared JSON attributes and records the attributes
on each. |
|
newFromBuilder ( array $attributes = [], string | null $connection = null ) : static |
Create a new model instance that is existing. |
|
setAttribute ( string $key, mixed $value ) |
Set a given attribute on the known JSON elements. |
|
setJsonAttribute ( string $attribute, string $key, mixed $value ) |
Set a given attribute on the known JSON elements. |
|
showJsonAttributes ( $show ) : boolean |
Allows you to specify if the attributes within various json columns
should be shown on toArray() and toJson() calls. Set this value in the
models constructor (to make sure it is set before newFromBuilder() is
called). This is true by default. |
|
showJsonColumns ( boolean $show ) : boolean |
Allows you to specify if the actual JSON column housing the attributes
should be shown on toArray() and toJson() calls. Set this value in the
models constructor (to make sure it is set before newFromBuilder() is
called). This is false by default. |
|