Entity
abstract class Entity extends Fluent
Abstract class Entity
Properties
protected array | $original | The entity attribute's original state. | |
$hidden | The attributes that should be hidden for arrays. | ||
protected array | $fillable | The attributes that are mass assignable. | |
protected array | $guarded | The attributes that aren't mass assignable. | |
bool | $exists | Indicates if the entity exists. |
Methods
__construct(array $attributes = array())
Constructor
$this
syncOriginal()
Sync the original attributes with the current.
array
getOriginal(string|null $key = null, mixed $default = null)
Get the entity's original attribute values.
$this
fill(array $attributes)
Fill the model with an array of attributes.
bool
isFillable(string $key)
Determine if the given attribute may be mass assigned.
bool
isGuarded(string $key)
Determine if the given key is guarded.
array
getDirty()
Get the attributes that have been changed since last sync.
array
toArray()
Convert the entity instance to an array.
Details
at line 72
__construct(array $attributes = array())
Constructor
at line 84
$this
syncOriginal()
Sync the original attributes with the current.
at line 98
array
getOriginal(string|null $key = null, mixed $default = null)
Get the entity's original attribute values.
at line 109
$this
fill(array $attributes)
Fill the model with an array of attributes.
at line 126
bool
isFillable(string $key)
Determine if the given attribute may be mass assigned.
at line 145
bool
isGuarded(string $key)
Determine if the given key is guarded.
at line 155
array
getDirty()
Get the attributes that have been changed since last sync.
at line 165
array
toArray()
Convert the entity instance to an array.