Не понимаю, почему выводит непонятный адрес, что такое 1?
Код: Выделить всё
echo $model->getImage()->getUrl()
Код: Выделить всё
/1/images/image-by-item-and-alias?item=Product1&dirtyAlias=4c2bacaab1-1.png
Код: Выделить всё
public function upload(){
if($this->validate()){
$path = 'upload/store/' . $this->image->baseName . '.' . $this->image->extension;
$this->image->saveAs($path);
$this->attachImage($path);
return true;
}else{
return false;
}
}