Illuminate\Database\Eloquent\Model::getArrayableAttributes PHP 메소드

getArrayableAttributes() 보호된 메소드

Get an attribute array of all arrayable attributes.
protected getArrayableAttributes ( ) : array
리턴 array
    protected function getArrayableAttributes()
    {
        return $this->getArrayableItems($this->attributes);
    }

Usage Example

예제 #1
0
 /**
  * Get an attribute array of all arrayable attributes.
  *
  * @return array
  */
 protected function getArrayableAttributes()
 {
     $arrayable_attributes = parent::getArrayableAttributes();
     foreach ($this->getMutatedAttributes() as $key) {
         $arrayable_attributes[$key] = $this->{$key};
     }
     return $arrayable_attributes;
 }
Model