This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

taha.azzabi14703
taha.azzabi14703

Hello I want to display an image on the frontend :

avatar:
            label: 'Photo de profil'
            oc.commentPosition: ''
            type: fileupload
            mode: image
            imageHeight: 260
            imageWidth: 260
            tab: Photos

in my model :

 public $attachOne  = [
      'avatar' => ['System\Models\File', 'public' => true ]
    ];

My question how I can display the image in the component, the syntax

Last updated

daftspunky
daftspunky

See the docs for more detail on this, however I think you're after

$model->avatar->getPath();

1-2 of 2

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.