src/Columns/Element.php
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);
    }
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);
    }
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 ) ; }
Fetch element value from eloquent.

@param $eloquent

@return mixed
Fetch element value from eloquent .