public function hydrate($target, $elements = null)
    {
        $elements = $this->getHydrationElements($elements);

        if (coollect($elements)->count() === 0) {
            return $target;
        }

        return $this->isCountry($target->toArray())
            ? $this->hydrateCountry($target, $elements)
            : $this->hydrateCountries($target, $elements);
    }
public function hydrate($target, $elements = null)
    {
        $elements = $this->getHydrationElements($elements);

        if (coollect($elements)->count() === 0) {
            return $target;
        }

        return $this->isCountry($target->toArray())
            ? $this->hydrateCountry($target, $elements)
            : $this->hydrateCountries($target, $elements);
    }
public function hydrate ( $ target , $ elements = null ) { $ elements = $ this -> getHydrationElements ( $ elements ) ; if ( coollect ( $ elements ) -> count ( ) === 0 ) { return $ target ; } return $ this -> isCountry ( $ target -> toArray ( ) ) ? $ this -> hydrateCountry ( $ target , $ elements ) : $ this -> hydrateCountries ( $ target , $ elements ) ; }
Hydrate a countries collection with languages.

@param \PragmaRX\Coollection\Package\Coollection|array|\stdClass $target
@param null $elements
@return \PragmaRX\Coollection\Package\Coollection
Hydrate a countries collection with languages .