public function actionCreate()
 {
     $model = new Status();
     if ($model->load(Yii::$app->request->post()) && $model->validate()) {
         return $this->render('view', ['model' => $model]);
     } else {
         return $this->render('create', ['model' => $model]);
     }
 }
 public function actionCreate()
 {
     $model = new Status();
     if ($model->load(Yii::$app->request->post()) && $model->validate()) {
         // valid data received in $model
         return $this->render('view', ['model' => $model]);
     } else {
         // either the page is initially displayed or there is some validation error
         return $this->render('create', ['model' => $model]);
     }
 }
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getStatus0()
 {
     return $this->hasOne(Status::className(), ['id' => 'status']);
 }
 public function actionIndex()
 {
     return new ActiveDataProvider(['query' => Status::find()->where(['is_active' => 1]), 'pagination' => ['pageSize' => 10], 'sort' => ['defaultOrder' => ['id' => SORT_DESC]]]);
 }