ColumnEntity
class ColumnEntity extends Entity
ColumnEntity
- FieldType 에서 table 스키마 를 정의 하기위해 사용
- AbstractFieldType class 의 columns 멤버 변수의 항목들을 ColumnEntity class 로 구성
Properties
protected array | $original | The entity attribute's original state. | from Entity |
$hidden | The attributes that should be hidden for arrays. | from Entity | |
protected array | $fillable | The attributes that are mass assignable. | from Entity |
protected array | $guarded | The attributes that aren't mass assignable. | from Entity |
bool | $exists | Indicates if the entity exists. | from Entity |
protected | $default |
Methods
Constructor
Get the entity's original attribute values.
set params
set unsigned attribute to true
set null able attribute to true
set default attribute
set description attribute
parameter $table 에 설정에 맞는 adding column 구문을 수행한다.
컬럼 제거
Details
at line 52
__construct(string $name, string $dataType)
Constructor
in Entity at line 84
$this
syncOriginal()
Sync the original attributes with the current.
in Entity at line 98
array
getOriginal(string|null $key = null, mixed $default = null)
Get the entity's original attribute values.
in Entity at line 109
$this
fill(array $attributes)
Fill the model with an array of attributes.
in Entity at line 126
bool
isFillable(string $key)
Determine if the given attribute may be mass assigned.
in Entity at line 145
bool
isGuarded(string $key)
Determine if the given key is guarded.
in Entity at line 155
array
getDirty()
Get the attributes that have been changed since last sync.
in Entity at line 165
array
toArray()
Convert the entity instance to an array.
at line 64
$this
setParams(array $params)
set params
at line 76
$this
setUnsigned()
set unsigned attribute to true
at line 88
$this
setNullAble()
set null able attribute to true
at line 101
$this
setDefault(string $default)
set default attribute
at line 114
$this
setDescription(string $description)
set description attribute
at line 128
void
add(Blueprint $table, string $prefix = '')
parameter $table 에 설정에 맞는 adding column 구문을 수행한다.
at line 160
void
drop(Blueprint $table, string $prefix = '')
컬럼 제거