private function buildRelationshipAttributes($model)
    {
        $result = [];

        foreach ($model->getSearchRelationships() as $method) {
            if (!method_exists($model, $method)) {
                continue;
            }

            $relation = self::getRelation($model->$method());
            $this->relationships[$method] = $relation;

            self::buildCastedAttributes($relation['model'], $result, $method);
            self::buildSearchAttributes($relation['model'], $result, $method);
        }

        return $result;
    }
private function buildRelationshipAttributes($model)
    {
        $result = [];

        foreach ($model->getSearchRelationships() as $method) {
            if (!method_exists($model, $method)) {
                continue;
            }

            $relation = self::getRelation($model->$method());
            $this->relationships[$method] = $relation;

            self::buildCastedAttributes($relation['model'], $result, $method);
            self::buildSearchAttributes($relation['model'], $result, $method);
        }

        return $result;
    }
private function buildRelationshipAttributes ( $ model ) { $ result = [ ] ; foreach ( $ model -> getSearchRelationships ( ) as $ method ) { if ( ! method_exists ( $ model , $ method ) ) { continue ; } $ relation = self :: getRelation ( $ model -> $ method ( ) ) ; $ this -> relationships [ $ method ] = $ relation ; self :: buildCastedAttributes ( $ relation [ 'model' ] , $ result , $ method ) ; self :: buildSearchAttributes ( $ relation [ 'model' ] , $ result , $ method ) ; } return $ result ; }
Build a list of attributes from the relationships.

@return void
Build a list of attributes from the relationships .