HasAttributes

Illuminate\Database\Eloquent\Concerns\HasAttributes

trait src/Illuminate/Database/Eloquent/Concerns/HasAttributes.php

append

v11.0.0 以前から

append($attributes)
@param array<string>|string $attributes
@return $this
  1. v11.0.0 追加
    変更後
    append($attributes) [@param array|string $attributes, @return $this]
  2. v12.18.0 シグネチャ変更
    変更前
    append($attributes) [@param array|string $attributes, @return $this]
    変更後
    append($attributes) [@param array<string>|string $attributes, @return $this]

attributesToArray

v11.0.0 以前から

attributesToArray()
@return array<string, mixed>
  1. v11.0.0 追加
    変更後
    attributesToArray() [@return array]
  2. v12.18.0 シグネチャ変更
    変更前
    attributesToArray() [@return array]
    変更後
    attributesToArray() [@return array<string, mixed>]

cacheMutatedAttributes

v11.0.0 以前から

static

static cacheMutatedAttributes($classOrInstance)
@param object|string $classOrInstance
@return void
  1. v11.0.0 追加
    変更後
    static cacheMutatedAttributes($classOrInstance) [@param object|string $classOrInstance, @return void]

currentEncrypter

v12.20.0 から

static

static currentEncrypter()
@return \Illuminate\Contracts\Encryption\Encrypter
  1. v12.20.0 追加
    変更後
    static currentEncrypter() [@return \Illuminate\Contracts\Encryption\Encrypter]

discardChanges

v11.0.0 以前から

discardChanges()
@return $this
  1. v11.0.0 追加
    変更後
    discardChanges() [@return $this]

encryptUsing

v11.0.0 以前から

static

static encryptUsing($encrypter)
@param \Illuminate\Contracts\Encryption\Encrypter|null $encrypter
@return void
  1. v11.0.0 追加
    変更後
    static encryptUsing($encrypter) [@param \Illuminate\Contracts\Encryption\Encrypter|null $encrypter, @return void]

except

v12.4.0 から

except($attributes)
@param array<string>|mixed $attributes
@return array
  1. v12.4.0 追加
    変更後
    except($attributes) [@param array|mixed $attributes, @return array]
  2. v12.18.0 シグネチャ変更
    変更前
    except($attributes) [@param array|mixed $attributes, @return array]
    変更後
    except($attributes) [@param array<string>|mixed $attributes, @return array]

fillJsonAttribute

v11.0.0 以前から

fillJsonAttribute($key, $value)
@param string $key
@param mixed $value
@return $this
  1. v11.0.0 追加
    変更後
    fillJsonAttribute($key, $value) [@param string $key, @param mixed $value, @return $this]

fromDateTime

v11.0.0 以前から

fromDateTime($value)
@param mixed $value
@return string|null
  1. v11.0.0 追加
    変更後
    fromDateTime($value) [@param mixed $value, @return string|null]

fromEncryptedString

v11.0.0 以前から

fromEncryptedString($value)
@param string $value
@return mixed
  1. v11.0.0 追加
    変更後
    fromEncryptedString($value) [@param string $value, @return mixed]

fromFloat

v11.0.0 以前から

fromFloat($value)
@param mixed $value
@return mixed
  1. v11.0.0 追加
    変更後
    fromFloat($value) [@param mixed $value, @return mixed]

fromJson

v11.0.0 以前から

fromJson($value, $asObject = false)
@param string|null $value
@param bool $asObject
@return mixed
  1. v11.0.0 追加
    変更後
    fromJson($value, $asObject = false) [@param string $value, @param bool $asObject, @return mixed]
  2. v11.20.0 シグネチャ変更
    変更前
    fromJson($value, $asObject = false) [@param string $value, @param bool $asObject, @return mixed]
    変更後
    fromJson($value, $asObject = false) [@param string|null $value, @param bool $asObject, @return mixed]

getAppends

v11.0.0 以前から

getAppends()
@return array
  1. v11.0.0 追加
    変更後
    getAppends() [@return array]

getAttribute

v11.0.0 以前から

getAttribute($key)
@param string $key
@return mixed
  1. v11.0.0 追加
    変更後
    getAttribute($key) [@param string $key, @return mixed]

getAttributes

v11.0.0 以前から

getAttributes()
@return array<string, mixed>
  1. v11.0.0 追加
    変更後
    getAttributes() [@return array]
  2. v11.42.0 シグネチャ変更
    変更前
    getAttributes() [@return array]
    変更後
    getAttributes() [@return array<string, mixed>]

getAttributeValue

v11.0.0 以前から

getAttributeValue($key)
@param string $key
@return mixed
  1. v11.0.0 追加
    変更後
    getAttributeValue($key) [@param string $key, @return mixed]

getCasts

v11.0.0 以前から

getCasts()
@return array
  1. v11.0.0 追加
    変更後
    getCasts() [@return array]

getChanges

v11.0.0 以前から

getChanges()
@return array<string, mixed>
  1. v11.0.0 追加
    変更後
    getChanges() [@return array]
  2. v12.18.0 シグネチャ変更
    変更前
    getChanges() [@return array]
    変更後
    getChanges() [@return array<string, mixed>]

getDateFormat

v11.0.0 以前から

getDateFormat()
@return string
  1. v11.0.0 追加
    変更後
    getDateFormat() [@return string]

getDates

v11.0.0 以前から

getDates()
@return array<int, string|null>
  1. v11.0.0 追加
    変更後
    getDates() [@return array]
  2. v12.41.0 シグネチャ変更
    変更前
    getDates() [@return array]
    変更後
    getDates() [@return array<int, string|null>]

getDirty

v11.0.0 以前から

getDirty()
@return array<string, mixed>
  1. v11.0.0 追加
    変更後
    getDirty() [@return array]
  2. v12.18.0 シグネチャ変更
    変更前
    getDirty() [@return array]
    変更後
    getDirty() [@return array<string, mixed>]

getMutatedAttributes

v11.0.0 以前から

getMutatedAttributes()
@return array
  1. v11.0.0 追加
    変更後
    getMutatedAttributes() [@return array]

getOriginal

v11.0.0 以前から

getOriginal($key = null, $default = null)
@param string|null $key
@param mixed $default
@return ($key is null ? array<string, mixed> : mixed)
  1. v11.0.0 追加
    変更後
    getOriginal($key = null, $default = null) [@param string|null $key, @param mixed $default, @return mixed|array]
  2. v12.15.0 シグネチャ変更
    変更前
    getOriginal($key = null, $default = null) [@param string|null $key, @param mixed $default, @return mixed|array]
    変更後
    getOriginal($key = null, $default = null) [@param string|null $key, @param mixed $default, @return ($key is null ? array<string, mixed> : mixed)]

getPrevious

v12.15.0 から

getPrevious()
@return array<string, mixed>
  1. v12.15.0 追加
    変更後
    getPrevious() [@return array]
  2. v12.18.0 シグネチャ変更
    変更前
    getPrevious() [@return array]
    変更後
    getPrevious() [@return array<string, mixed>]

getRawOriginal

v11.0.0 以前から

getRawOriginal($key = null, $default = null)
@param string|null $key
@param mixed $default
@return ($key is null ? array<string, mixed> : mixed)
  1. v11.0.0 追加
    変更後
    getRawOriginal($key = null, $default = null) [@param string|null $key, @param mixed $default, @return mixed|array]
  2. v12.15.0 シグネチャ変更
    変更前
    getRawOriginal($key = null, $default = null) [@param string|null $key, @param mixed $default, @return mixed|array]
    変更後
    getRawOriginal($key = null, $default = null) [@param string|null $key, @param mixed $default, @return ($key is null ? array<string, mixed> : mixed)]

getRelationValue

v11.0.0 以前から

getRelationValue($key)
@param string $key
@return mixed
  1. v11.0.0 追加
    変更後
    getRelationValue($key) [@param string $key, @return mixed]

hasAnyGetMutator

v11.38.0 から

hasAnyGetMutator($key)
@param string $key
@return bool
  1. v11.38.0 追加
    変更後
    hasAnyGetMutator($key) [@param string $key, @return bool]

hasAppended

v11.0.0 以前から

hasAppended($attribute)
@param string $attribute
@return bool
  1. v11.0.0 追加
    変更後
    hasAppended($attribute) [@param string $attribute, @return bool]

hasAttribute

v11.3.0 から

hasAttribute($key)
@param string $key
@return bool
  1. v11.3.0 追加
    変更後
    hasAttribute($key) [@param string $key, @return bool]

hasAttributeGetMutator

v11.0.0 以前から

hasAttributeGetMutator($key)
@param string $key
@return bool
  1. v11.0.0 追加
    変更後
    hasAttributeGetMutator($key) [@param string $key, @return bool]

hasAttributeMutator

v11.0.0 以前から

hasAttributeMutator($key)
@param string $key
@return bool
  1. v11.0.0 追加
    変更後
    hasAttributeMutator($key) [@param string $key, @return bool]

hasAttributeSetMutator

v11.0.0 以前から

hasAttributeSetMutator($key)
@param string $key
@return bool
  1. v11.0.0 追加
    変更後
    hasAttributeSetMutator($key) [@param string $key, @return bool]

hasCast

v11.0.0 以前から

hasCast($key, $types = null)
@param string $key
@param array|string|null $types
@return bool
  1. v11.0.0 追加
    変更後
    hasCast($key, $types = null) [@param string $key, @param array|string|null $types, @return bool]

hasGetMutator

v11.0.0 以前から

hasGetMutator($key)
@param string $key
@return bool
  1. v11.0.0 追加
    変更後
    hasGetMutator($key) [@param string $key, @return bool]

hasSetMutator

v11.0.0 以前から

hasSetMutator($key)
@param string $key
@return bool
  1. v11.0.0 追加
    変更後
    hasSetMutator($key) [@param string $key, @return bool]

isClean

v11.0.0 以前から

isClean($attributes = null)
@param array<string>|string|null $attributes
@return bool
  1. v11.0.0 追加
    変更後
    isClean($attributes = null) [@param array|string|null $attributes, @return bool]
  2. v12.18.0 シグネチャ変更
    変更前
    isClean($attributes = null) [@param array|string|null $attributes, @return bool]
    変更後
    isClean($attributes = null) [@param array<string>|string|null $attributes, @return bool]

isDirty

v11.0.0 以前から

isDirty($attributes = null)
@param array<string>|string|null $attributes
@return bool
  1. v11.0.0 追加
    変更後
    isDirty($attributes = null) [@param array|string|null $attributes, @return bool]
  2. v12.18.0 シグネチャ変更
    変更前
    isDirty($attributes = null) [@param array|string|null $attributes, @return bool]
    変更後
    isDirty($attributes = null) [@param array<string>|string|null $attributes, @return bool]

isRelation

v11.0.0 以前から

isRelation($key)
@param string $key
@return bool
  1. v11.0.0 追加
    変更後
    isRelation($key) [@param string $key, @return bool]

mergeAppends

v12.25.0 から

mergeAppends(array $appends)
@param array<string> $appends
@return $this
  1. v12.25.0 追加
    変更後
    mergeAppends(array $appends) [@param array<string> $appends, @return $this]

mergeCasts

v11.0.0 以前から

mergeCasts($casts)
@param array $casts
@return $this
  1. v11.0.0 追加
    変更後
    mergeCasts($casts) [@param array $casts, @return $this]

only

v11.0.0 以前から

only($attributes)
@param array<string>|mixed $attributes
@return array<string, mixed>
  1. v11.0.0 追加
    変更後
    only($attributes) [@param array|mixed $attributes, @return array]
  2. v12.18.0 シグネチャ変更
    変更前
    only($attributes) [@param array|mixed $attributes, @return array]
    変更後
    only($attributes) [@param array<string>|mixed $attributes, @return array<string, mixed>]

originalIsEquivalent

v11.0.0 以前から

originalIsEquivalent($key)
@param string $key
@return bool
  1. v11.0.0 追加
    変更後
    originalIsEquivalent($key) [@param string $key, @return bool]

relationsToArray

v11.0.0 以前から

relationsToArray()
@return array
  1. v11.0.0 追加
    変更後
    relationsToArray() [@return array]

setAppends

v11.0.0 以前から

setAppends(array $appends)
@param array $appends
@return $this
  1. v11.0.0 追加
    変更後
    setAppends(array $appends) [@param array $appends, @return $this]

setAttribute

v11.0.0 以前から

setAttribute($key, $value)
@param string $key
@param mixed $value
@return mixed
  1. v11.0.0 追加
    変更後
    setAttribute($key, $value) [@param string $key, @param mixed $value, @return mixed]

setDateFormat

v11.0.0 以前から

setDateFormat($format)
@param string $format
@return $this
  1. v11.0.0 追加
    変更後
    setDateFormat($format) [@param string $format, @return $this]

setRawAttributes

v11.0.0 以前から

setRawAttributes(array $attributes, $sync = false)
@param array $attributes
@param bool $sync
@return $this
  1. v11.0.0 追加
    変更後
    setRawAttributes(array $attributes, $sync = false) [@param array $attributes, @param bool $sync, @return $this]

syncChanges

v11.0.0 以前から

syncChanges()
@return $this
  1. v11.0.0 追加
    変更後
    syncChanges() [@return $this]

syncOriginal

v11.0.0 以前から

syncOriginal()
@return $this
  1. v11.0.0 追加
    変更後
    syncOriginal() [@return $this]

syncOriginalAttribute

v11.0.0 以前から

syncOriginalAttribute($attribute)
@param string $attribute
@return $this
  1. v11.0.0 追加
    変更後
    syncOriginalAttribute($attribute) [@param string $attribute, @return $this]

syncOriginalAttributes

v11.0.0 以前から

syncOriginalAttributes($attributes)
@param array<string>|string $attributes
@return $this
  1. v11.0.0 追加
    変更後
    syncOriginalAttributes($attributes) [@param array|string $attributes, @return $this]
  2. v12.18.0 シグネチャ変更
    変更前
    syncOriginalAttributes($attributes) [@param array|string $attributes, @return $this]
    変更後
    syncOriginalAttributes($attributes) [@param array<string>|string $attributes, @return $this]

wasChanged

v11.0.0 以前から

wasChanged($attributes = null)
@param array<string>|string|null $attributes
@return bool
  1. v11.0.0 追加
    変更後
    wasChanged($attributes = null) [@param array|string|null $attributes, @return bool]
  2. v12.18.0 シグネチャ変更
    変更前
    wasChanged($attributes = null) [@param array|string|null $attributes, @return bool]
    変更後
    wasChanged($attributes = null) [@param array<string>|string|null $attributes, @return bool]

withoutAppends

v12.50.0 から

withoutAppends()
@return $this
  1. v12.50.0 追加
    変更後
    withoutAppends() [@return $this]