Ejemplo n.º 1
0
 public function search($params)
 {
     $query = Dorks::find();
     $dataProvider = new ActiveDataProvider(['query' => $query]);
     $this->load($params);
     if (!$this->validate()) {
         return $dataProvider;
     }
     //            $query->andFilterWhere([
     //                'id' => $this->id,
     //                'db_id' => $this->db_id
     //            ]);
     //            $query->andFilterWhere(['like', 'title', $this->title])
     //                ->andFilterWhere(['like', 'text', $this->text]);
     return $dataProvider;
 }
Ejemplo n.º 2
0
 public function actionIndex()
 {
     return $this->render('index', ['model' => Dorks::find()->all()]);
 }