Illuminate\Database\Eloquent\Model::__get PHP Метод

__get() публичный Метод

Dynamically retrieve attributes on the model.
public __get ( string $key ) : mixed
$key string
Результат mixed
    public function __get($key)
    {
        return $this->getAttribute($key);
    }

Usage Example

Пример #1
0
 public function __get($key)
 {
     if ($this->isEloquent()) {
         return $this->data->__get($key);
     }
     return object_get($this->data, $key);
 }
All Usage Examples Of Illuminate\Database\Eloquent\Model::__get
Model