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