Esensi\Model\Traits\RelatingModelTrait::__get PHP Method

__get() public method

Dynamically retrieve attributes.
public __get ( string $key ) : mixed
$key string
return mixed
    public function __get($key)
    {
        // Resolve relationship dynamically
        if ($relationship = $this->getDynamicRelationship($key)) {
            return $relationship;
        }
        // Default Eloquent dynamic getter
        return parent::__get($key);
    }