protected function fetchValue($eloquent)
    {
        $id = $this->id();

        // Treat (Has)Many(ToMany|Through) relations as "count()" subQuery.
        if (($relation = $this->hasRelation($eloquent, $id)) && $this->isCountableRelation($relation)) {
            return $this->fetchRelationValue($eloquent, $id, [$id => $relation], true);
        }

        if ($this->relations) {
            return $this->fetchRelationValue($eloquent, $id, $this->relations, true);
        }

        return \admin\helpers\eloquent_attribute($eloquent, $id);
    }