public function getUrlAttribute($suffix = '')
    {
        if (!$this->exists) {
            return Cache::rememberForever('missing_photo', function () {
                return static::placeholder('No photo provided');
            });
        }

        if (!$this->processed) {
            return Cache::rememberForever('processing_photo', function () {
                return static::placeholder(
                    "This photo is\nbeing processed\nand will appear\nshortly"
                );
            });
        }

        return "/photo/{$this->photoId}$suffix.jpg";
    }
public function getUrlAttribute($suffix = '')
    {
        if (!$this->exists) {
            return Cache::rememberForever('missing_photo', function () {
                return static::placeholder('No photo provided');
            });
        }

        if (!$this->processed) {
            return Cache::rememberForever('processing_photo', function () {
                return static::placeholder(
                    "This photo is\nbeing processed\nand will appear\nshortly"
                );
            });
        }

        return "/photo/{$this->photoId}$suffix.jpg";
    }
public function getUrlAttribute ( $ suffix = '' ) { if ( ! $ this -> exists ) { return Cache :: rememberForever ( 'missing_photo' , function ( ) { return static :: placeholder ( 'No photo provided' ) ; } ) ; } if ( ! $ this -> processed ) { return Cache :: rememberForever ( 'processing_photo' , function ( ) { return static :: placeholder ( "This photo is\nbeing processed\nand will appear\nshortly" ) ; } ) ; } return "/photo/{$this->photoId}$suffix.jpg" ; }
Return the public URL for the photo.

@param string $suffix

@return string
Return the public URL for the photo .