public function getS3Image()
    {
        $url = Storage::disk(Config::get('cms.storage-location', 'local'))->url($this->location);

        if (!is_null(config('cms.cloudfront'))) {
            $url = str_replace(config('filesystems.disks.s3.bucket').'.s3.'.config('filesystems.disks.s3.region').'.amazonaws.com', config('cms.cloudfront'), $url);
        }

        return $url;
    }
public function getS3Image()
    {
        $url = Storage::disk(Config::get('cms.storage-location', 'local'))->url($this->location);

        if (!is_null(config('cms.cloudfront'))) {
            $url = str_replace(config('filesystems.disks.s3.bucket').'.s3.'.config('filesystems.disks.s3.region').'.amazonaws.com', config('cms.cloudfront'), $url);
        }

        return $url;
    }
public function getS3Image ( ) { $ url = Storage :: disk ( Config :: get ( 'cms.storage-location' , 'local' ) ) -> url ( $ this -> location ) ; if ( ! is_null ( config ( 'cms.cloudfront' ) ) ) { $ url = str_replace ( config ( 'filesystems.disks.s3.bucket' ) . '.s3.' . config ( 'filesystems.disks.s3.region' ) . '.amazonaws.com' , config ( 'cms.cloudfront' ) , $ url ) ; } return $ url ; }
Get an S3 image

@return string
Get an S3 image