public function getBelongsToRelationAttributeValue($key)
    {
        $relationKey  = camel_case($key);
        $attributeKey = snake_case($key);

        if ($this->relationLoaded($relationKey)) {

            // check to make sure we don't break eager loading and internal
            // lookups for the foreign key
            $self = __FUNCTION__;

            $caller = array_first(debug_backtrace(false), function ($key, $trace) use ($self) {
                $caller = $trace['function'];

                // skip first two (since that includes the Model's generated method)
                if ($key < 2) {
                    return false;
                }

                if (array_get($trace, 'class') === 'Illuminate\Database\Eloquent\Relations\BelongsTo') {
                    return false;
                }

                return $caller != $self
                    && $caller != 'mutateAttribute'
                    && $caller != 'getAttributeValue'
                    && $caller != 'getAttribute'
                    && $caller != '__get';
            });

            if (    ! array_key_exists('class', $caller)
                ||  (   $caller['class'] !== 'Illuminate\Database\Eloquent\Model'
                    &&  $caller['class'] !== 'Illuminate\Database\Eloquent\Builder'
                    &&  $caller['class'] !== 'Illuminate\Database\Eloquent\Relations\Relation'
                    )
            ) {
                return $this->relations[$relationKey];
            }
        }

        return $this->attributes[$attributeKey];
    }