255], ]; } public function search($params) { $optionsSearch = self::defaultOptionsSearch() ; $query = CreditHistory::find() ->with($optionsSearch['with']) ->innerJoinWith($optionsSearch['join_with'], true) ->where(['credit_history.id_producer' => Producer::getId()]) ->orderBy('id DESC') ; $dataProvider = new ActiveDataProvider([ 'query' => $query, 'sort' => false, 'pagination' => [ 'pageSize' => 20, ], ]); $this->load($params); if (!$this->validate()) { return $dataProvider; } return $dataProvider; } }