Property | Type | Description | |
---|---|---|---|
$exists | boolean | Indicates if the entity exists. |
Property | Type | Description | |
---|---|---|---|
$fillable | array | The attributes that are mass assignable. | |
$guarded | array | The attributes that aren't mass assignable. | |
$hidden | array | The attributes that should be hidden for arrays. | |
$original | array | The entity attribute's original state. |
Method | Description | |
---|---|---|
__construct ( array $attributes = [] ) | Constructor | |
fill ( array $attributes ) | Fill the model with an array of attributes. | |
getDirty ( ) : array | Get the attributes that have been changed since last sync. | |
getOriginal ( string | null $key = null, mixed $default = null ) : array | Get the entity's original attribute values. | |
isFillable ( string $key ) : boolean | Determine if the given attribute may be mass assigned. | |
isGuarded ( string $key ) : boolean | Determine if the given key is guarded. | |
syncOriginal ( ) | Sync the original attributes with the current. | |
toArray ( ) : array | Convert the entity instance to an array. |
public __construct ( array $attributes = [] ) | ||
$attributes | array | attributes |
public isFillable ( string $key ) : boolean | ||
$key | string | key name |
return | boolean |
protected array $fillable | ||
return | array |
protected array $guarded | ||
return | array |
protected array $original | ||
return | array |