public function search($params)
 {
     $query = Teamevent::find();
     $dataProvider = new ActiveDataProvider(['query' => $query]);
     if (!($this->load($params) && $this->validate())) {
         return $dataProvider;
     }
     $query->andFilterWhere(['id' => $this->id, 'time_start' => $this->time_start, 'time_end' => $this->time_end, 'date_start' => $this->date_start, 'date_end' => $this->date_end, 'time_deleted' => $this->time_deleted, 'time_create' => $this->time_create]);
     $query->andFilterWhere(['like', 'name', $this->name])->andFilterWhere(['like', 'status', $this->status]);
     return $dataProvider;
 }
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getTeamevent()
 {
     return $this->hasOne(Teamevent::className(), ['id' => 'teamevent_id']);
 }
 /**
  * Finds the Teamevent model based on its primary key value.
  * If the model is not found, a 404 HTTP exception will be thrown.
  * @param integer $id
  * @return Teamevent the loaded model
  * @throws NotFoundHttpException if the model cannot be found
  */
 protected function findModel($id)
 {
     if (($model = Teamevent::findOne($id)) !== null) {
         return $model;
     } else {
         throw new NotFoundHttpException('The requested page does not exist.');
     }
 }