Exemplo n.º 1
0
 public function __get($attribute)
 {
     if ('profile' == $attribute) {
         return parent::__get($attribute);
     }
     $parent = parent::__get($attribute);
     if (!$parent && $this->profile && in_array($attribute, $this->profiles)) {
         return $this->profile->{$attribute};
     } else {
         return $parent;
     }
 }