public function actionAdd()
 {
     $model = new Customlog();
     if ($model->load(\Yii::$app->request->post()) && $model->validate() && $model->save()) {
         $this->redirect('/ajax/customlog/index.html');
     } else {
         return $this->render('add', ['model' => $model]);
     }
 }
Example #2
0
 /**
  * 
  * @return \yii\data\ActiveDataProvider
  */
 public static function findCustomlogType($whereCondition = '', $whereArray = [])
 {
     $model = new Customlog();
     $dataProvider = new ActiveDataProvider(['query' => $model->find()->where($whereCondition, $whereArray), 'pagination' => ['pagesize' => 20]]);
     return $dataProvider;
 }