public function hydrateBorders($country)
    {
        $country['borders'] = isset($country['borders'])
            ? $country['borders'] = countriesCollect($country['borders'])->map(function ($border) {
                return $this->repository->call('where', ['cca3', $border])->first();
            })
            : countriesCollect();

        return $country;
    }
public function hydrateBorders($country)
    {
        $country['borders'] = isset($country['borders'])
            ? $country['borders'] = countriesCollect($country['borders'])->map(function ($border) {
                return $this->repository->call('where', ['cca3', $border])->first();
            })
            : countriesCollect();

        return $country;
    }
public function hydrateBorders ( $ country ) { $ country [ 'borders' ] = isset ( $ country [ 'borders' ] ) ? $ country [ 'borders' ] = countriesCollect ( $ country [ 'borders' ] ) -> map ( function ( $ border ) { return $ this -> repository -> call ( 'where' , [ 'cca3' , $ border ] ) -> first ( ) ; } ) : countriesCollect ( ) ; return $ country ; }
Hydrate borders.

@param $country
@return mixed
Hydrate borders .