<?php namespace myresto\models;use yii\base\Model;use yii\data\ActiveDataProvider;use myresto\models\SyncAccountToJurnal;class SyncAccountToJurnalSearch extends SyncAccountToJurnal{public function rules(){return [ [['payment_fpkey'],'integer'],[['payment_type','nama_akun'],'safe'],];}public function scenarios(){return Model::scenarios();}public function search($params){$query=SyncAccountToJurnal::find()->where(['type_con'=>'resto']);$dataProvider=new ActiveDataProvider([ 'query'=>$query,]);$this->load($params);if(!$this->validate()){return $dataProvider;}$query->andFilterWhere([ 'payment_fpkey'=>$this->payment_fpkey,]);$query->andFilterWhere(['like','payment_type',$this->payment_type])->andFilterWhere(['like','nama_akun',$this->nama_akun]);return $dataProvider;}}