$query, 'pagination' => [ 'pagesize' => 100, ], 'sort' => [ 'defaultOrder' => [ 'created' => SORT_DESC ] ], ] ); $this->load($params); if (!$this->validate()) { // uncomment the following line if you do not want to return any records when validation fails // $query->where('0=1'); return $dataProvider; } // Get the module instance $module = Module::getInstance(); if ($module->setBlameableBehavior) { $query->andWhere([ 'createdBy' => Yii::$app->user->id ]); } $query->orFilterWhere( [ 'like', 'fileName', $this->globalSearch, ] // ) // ->orFilterWhere( // [ // 'like', // 'created', // $this->globalSearch, // ] // ) // ->orFilterWhere( // [ // 'like', // 'modified', // $this->globalSearch, // ] ); return $dataProvider; } }