public function urlsForAttachment($attachmentName)
    {
        $urls = [];

        if (isset($this->attachedFiles[ $attachmentName ])) {
            $attachment = $this->attachedFiles[ $attachmentName ];

            foreach ($attachment->variants(true) as $variant) {
                $urls[ $variant ] = $attachment->url($variant);
            }
        }

        return $urls;
    }
public function urlsForAttachment($attachmentName)
    {
        $urls = [];

        if (isset($this->attachedFiles[ $attachmentName ])) {
            $attachment = $this->attachedFiles[ $attachmentName ];

            foreach ($attachment->variants(true) as $variant) {
                $urls[ $variant ] = $attachment->url($variant);
            }
        }

        return $urls;
    }
public function urlsForAttachment ( $ attachmentName ) { $ urls = [ ] ; if ( isset ( $ this -> attachedFiles [ $ attachmentName ] ) ) { $ attachment = $ this -> attachedFiles [ $ attachmentName ] ; foreach ( $ attachment -> variants ( true ) as $ variant ) { $ urls [ $ variant ] = $ attachment -> url ( $ variant ) ; } } return $ urls ; }
Return the image urls for a given attachment.

@param  string $attachmentName
@return array
Return the image urls for a given attachment .