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

getAttributeFromArray() 보호된 메소드

Get an attribute from the $attributes array.
protected getAttributeFromArray ( string $key ) : mixed
$key string
리턴 mixed
    protected function getAttributeFromArray($key)
    {
        if (array_key_exists($key, $this->attributes)) {
            return $this->attributes[$key];
        }
    }

Usage Example

예제 #1
0
 /**
  * Provides public access to get the raw attribute value from the model.
  * Used in areas where no mutations are required but performance is critical.
  * @param $key
  * @return mixed
  */
 public function getRawAttribute($key)
 {
     return parent::getAttributeFromArray($key);
 }
All Usage Examples Of Illuminate\Database\Eloquent\Model::getAttributeFromArray
Model