public function actionImageids($id) { $model = Car::findOne($id); $images = $model->imagesList; $res = ''; if ($images) { foreach ($images as $key => $value) { $res .= "<option value='" . $value . "'>" . $value . "</option>"; } } else { $res = "<option>-</option>"; } return json_encode($res); }
public function actionView($id) { $model = Car::findOne($id); return $this->render('_view', ['model' => $model]); }