protected function wrapSegments($segments)
    {
        return collect($segments)->map(function ($segment, $key) use ($segments) {
            return $key == 0 && count($segments) > 1
                            ? $this->wrapTable($segment)
                            : $this->wrapValue($segment);
        })->implode('.');
    }
protected function wrapSegments($segments)
    {
        return collect($segments)->map(function ($segment, $key) use ($segments) {
            return $key == 0 && count($segments) > 1
                            ? $this->wrapTable($segment)
                            : $this->wrapValue($segment);
        })->implode('.');
    }
protected function wrapSegments ( $ segments ) { return collect ( $ segments ) -> map ( function ( $ segment , $ key ) use ( $ segments ) { return $ key == 0 && count ( $ segments ) > 1 ? $ this -> wrapTable ( $ segment ) : $ this -> wrapValue ( $ segment ) ; } ) -> implode ( '.' ) ; }
Wrap the given value segments.

@param  array  $segments
@return string
Wrap the given value segments .