public function actionEdit_service() { $service = new Services(); $servic = $service->find()->where(['id' => $_GET['id']])->one(); $this->app->parser->render('_form_services', ['service' => $servic, 'title' => 'Редактирование сервиса']); }
public function actionGet_service() { $service = new Services(); $cityAll = $service->find()->orderBy('name', 'ASC')->all(); echo Forms::dropDownList('service', null, ArrayHelper::map($cityAll, 'id', 'name'), ['class' => 'searchService form-control', 'prompt' => 'Выберите услугу']); }
public function actionAdd_service() { $services = new Services(); $this->app->parser->render('add_service', ['services' => $services->find()->all()]); }