public function search($params)
 {
     $query = CriticsReviews::find();
     $dataProvider = new ActiveDataProvider(['query' => $query]);
     if (!($this->load($params) && $this->validate())) {
         return $dataProvider;
     }
     $query->andFilterWhere(['Id' => $this->Id, 'criticId' => $this->criticId, 'estId' => $this->estId, 'foodRate' => $this->foodRate, 'serviceRate' => $this->serviceRate, 'decorRate' => $this->decorRate, 'createdOn' => $this->createdOn, 'status' => $this->status, 'updatedOn' => $this->updatedOn, 'updatedBy' => $this->updatedBy, 'createdBy' => $this->createdBy]);
     $query->andFilterWhere(['like', 'description', $this->description])->andFilterWhere(['like', 'ip', $this->ip]);
     return $dataProvider;
 }
 /**
  * Finds the CriticsReviews model based on its primary key value.
  * If the model is not found, a 404 HTTP exception will be thrown.
  * @param integer $id
  * @return CriticsReviews the loaded model
  * @throws NotFoundHttpException if the model cannot be found
  */
 protected function findModel($id)
 {
     if (($model = CriticsReviews::findOne($id)) !== null) {
         return $model;
     } else {
         throw new NotFoundHttpException('The requested page does not exist.');
     }
 }