public function getUrlAttribute()
    {
        if ($this->isLocalFile()) {
            return url(str_replace('public/', 'storage/', $this->location));
        } elseif ($this->fileExists()) {
            return $this->getS3Image();
        }

        return $this->lostImage();
    }
public function getUrlAttribute()
    {
        if ($this->isLocalFile()) {
            return url(str_replace('public/', 'storage/', $this->location));
        } elseif ($this->fileExists()) {
            return $this->getS3Image();
        }

        return $this->lostImage();
    }
public function getUrlAttribute ( ) { if ( $ this -> isLocalFile ( ) ) { return url ( str_replace ( 'public/' , 'storage/' , $ this -> location ) ) ; } elseif ( $ this -> fileExists ( ) ) { return $ this -> getS3Image ( ) ; } return $ this -> lostImage ( ) ; }
Get the images url location.

@param string $value

@return string
Get the images url location .