Свойство | Тип | Описание | |
---|---|---|---|
$exists | boolean | Indicates if the entity exists. |
Свойство | Тип | Описание | |
---|---|---|---|
$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. |
Метод | Описание | |
---|---|---|
__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 |
Результат | boolean |
public syncOriginal ( ) |
protected array $fillable | ||
Результат | array |
protected array $guarded | ||
Результат | array |
protected array $original | ||
Результат | array |