|
|
@ -1,5 +1,8 @@ |
|
|
|
<?php |
|
|
|
|
|
|
|
use backend\modules\shop\models\ars\Area; |
|
|
|
use backend\modules\shop\models\ars\City; |
|
|
|
use backend\modules\shop\models\ars\Province; |
|
|
|
use yii\helpers\Html; |
|
|
|
use yii\widgets\DetailView; |
|
|
|
|
|
|
@ -22,12 +25,36 @@ $this->params['breadcrumbs'][] = $this->title; |
|
|
|
'attributes' => [ |
|
|
|
'id', |
|
|
|
'name', |
|
|
|
'province', |
|
|
|
'city', |
|
|
|
'area', |
|
|
|
[ |
|
|
|
'attribute' => 'province', |
|
|
|
'value' => function ($model) { |
|
|
|
$province = Province::findOne(['province_id' => $model->province]); |
|
|
|
if ($province) { |
|
|
|
return $province->name; |
|
|
|
} |
|
|
|
} |
|
|
|
], |
|
|
|
[ |
|
|
|
'attribute' => 'city', |
|
|
|
'value' => function ($model) { |
|
|
|
$city = City::findOne(['city_id' => $model->city]); |
|
|
|
if ($city) { |
|
|
|
return $city->name; |
|
|
|
} |
|
|
|
} |
|
|
|
], |
|
|
|
[ |
|
|
|
'attribute' => 'area', |
|
|
|
'value' => function ($model) { |
|
|
|
$area = Area::findOne(['area_id' => $model->area]); |
|
|
|
if ($area) { |
|
|
|
return $area->name; |
|
|
|
} |
|
|
|
} |
|
|
|
], |
|
|
|
'address:ntext', |
|
|
|
'updated_at', |
|
|
|
'created_at', |
|
|
|
'updated_at:datetime', |
|
|
|
'created_at:datetime', |
|
|
|
], |
|
|
|
]) ?>
|
|
|
|
|
|
|
|