src/Metable.php
protected function metaSelectListsKey(Builder $query, $key)
    {
        if (strpos($key, '.') !== false) {
            return $query->addSelect($key);
        } elseif ($this->hasColumn($key)) {
            return $query->addSelect($this->getTable() . '.' . $key);
        }

        $alias = $this->joinMeta($query, $key);

        return $query->addSelect("{$alias}.meta_value as {$key}");
    }
protected function metaSelectListsKey(Builder $query, $key)
    {
        if (strpos($key, '.') !== false) {
            return $query->addSelect($key);
        } elseif ($this->hasColumn($key)) {
            return $query->addSelect($this->getTable() . '.' . $key);
        }

        $alias = $this->joinMeta($query, $key);

        return $query->addSelect("{$alias}.meta_value as {$key}");
    }
protected function metaSelectListsKey ( Builder $ query , $ key ) { if ( strpos ( $ key , '.' ) !== false ) { return $ query -> addSelect ( $ key ) ; } elseif ( $ this -> hasColumn ( $ key ) ) { return $ query -> addSelect ( $ this -> getTable ( ) . '.' . $ key ) ; } $ alias = $ this -> joinMeta ( $ query , $ key ) ; return $ query -> addSelect ( "{$alias}.meta_value as {$key}" ) ; }
Add select clause for key of the list array.

@param  \Sofa\Eloquence\Builder $query
@param  string $key
@return \Sofa\Eloquence\Builder
Add select clause for key of the list array .