public function checkIsTextBoxByQuestionId($id) { if (TextBox::find()->where(['id' => $id])->exists() == 1) { return true; } return false; }
/** * Lists all TextBox models. * @return mixed */ public function actionIndex() { $dataProvider = new ActiveDataProvider(['query' => TextBox::find()]); return $this->render('index', ['dataProvider' => $dataProvider]); }