Property | Type | Description | |
---|---|---|---|
$mutable | boolean | Check if model should mutate attributes checking the existence of a specific method on model class. Default is true. |
Property | Type | Description | |
---|---|---|---|
$attributes | array | The model's attributes. | |
$fillable | array | Once you put at least one string in this array, only the attributes specified here will be changed with the setAttributes method. | |
$guarded | array | The attributes that are not mass assignable. The opposite to the fillable array;. | |
$original | array | The model attribute's original state. |
Method | Description | |
---|---|---|
__get ( mixed $key ) : mixed | Dynamically retrieve attributes on the model. | |
__isset ( mixed $key ) : boolean | Determine if an attribute exists on the model. | |
__set ( mixed $key, mixed $value ) : void | Dynamically set attributes on the model. | |
__unset ( mixed $key ) : void | Unset an attribute on the model. | |
cleanAttribute ( string $key ) : void | Set a given attribute on the model. | |
fill ( array $input, boolean $force = false ) : void | Set the model attributes using an array. | |
getAttribute ( string $key ) : mixed | Get an attribute from the model. | |
getAttributes ( ) : mixed | Get all attributes from the model. | |
setAttribute ( string $key, mixed $value ) : void | Set a given attribute on the model. | |
syncOriginalAttributes ( ) : void | Stores original attributes from actual data from attributes to be used in future comparisons about changes. | |
toArray ( ) : array | Returns the model instance as an Array. |
Method | Description | |
---|---|---|
buildMutatorMethod ( mixed $key, mixed $prefix ) : string | Create mutator method pattern. | |
hasMutatorMethod ( mixed $key, mixed $prefix ) : boolean | Verify if model has a mutator method defined. |
public cleanAttribute ( string $key ) : void | ||
$key | string | Name of the attribute to be unset. |
return | void |
public getAttribute ( string $key ) : mixed | ||
$key | string | The attribute to be accessed. |
return | mixed |
public getAttributes ( ) : mixed | ||
return | mixed |
public syncOriginalAttributes ( ) : void | ||
return | void |
protected array $fillable | ||
return | array |
protected array $guarded | ||
return | array |
public bool $mutable | ||
return | boolean |
protected array $original | ||
return | array |