Modules\Doptor\Slideshow\Models\Slideshow::getImageAttribute PHP Method

getImageAttribute() public method

Get the slideshow image with its directory location
public getImageAttribute ( ) : string
return string
    public function getImageAttribute()
    {
        $image = $this->attributes['image'];
        if ($image) {
            if (str_contains($image, '/')) {
                return $image;
            } else {
                // if the slideshow image has been uploaded
                // using old version of file upload
                return $this->images_path . $image;
            }
        }
    }