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
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
See the docs for more detail on this, however I think you're after
$model->avatar->getPath();
1-2 of 2