Browse Source

Correction lien photo liste des produits

refactoring
Guillaume Bourgeois 5 years ago
parent
commit
5817d829dc
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      backend/views/product/index.php

+ 2
- 2
backend/views/product/index.php View File

@@ -67,8 +67,8 @@ $this->addButton(['label' => '+', 'url' => 'product/create', 'class' => 'btn btn
'filter' => '',
'value' => function($model) {
if(strlen($model->photo)) {
$url = Yii::$app->urlManagerProducer->getBaseUrl() ;
return '<img class="photo-product" src="'.$url.'/uploads/'.$model->photo.'" />' ;
$url = Yii::$app->urlManagerProducer->getHostInfo().'/'.Yii::$app->urlManagerProducer->baseUrl ;
return '<img class="photo-product" src="'.$url.'uploads/'.$model->photo.'" />' ;
}
return '' ;
}

Loading…
Cancel
Save