src/Presenters/Presenter.php
protected function getImageUrlOrDefault()
    {
        $file = '';

        if (is_object($this->entity->image)) {
            $file = $this->entity->image->path;
        }

        if (!Storage::exists($file)) {
            $file = $this->imgNotFound();
        }

        return Storage::url($file);
    }
protected function getImageUrlOrDefault()
    {
        $file = '';

        if (is_object($this->entity->image)) {
            $file = $this->entity->image->path;
        }

        if (!Storage::exists($file)) {
            $file = $this->imgNotFound();
        }

        return Storage::url($file);
    }
protected function getImageUrlOrDefault ( ) { $ file = '' ; if ( is_object ( $ this -> entity -> image ) ) { $ file = $ this -> entity -> image -> path ; } if ( ! Storage :: exists ( $ file ) ) { $ file = $ this -> imgNotFound ( ) ; } return Storage :: url ( $ file ) ; }
Get the path of the first image linked to this model
or the path to the default image.

@return string path
Get the path of the first image linked to this model or the path to the default image .