title: How to change search model for using one field
body: <p>I have CRUD generated bu Gii. By default, the search in app use one field for each table column. How should i change my search model, for make search in all columns via alone field?</p>
  
  <p>That's my model:</p>
  
  <pre><code>class UserSearch extends User
  {
      /**
       * @inheritdoc
       */
      public function rules()
      {
          return [
              [['id', 'status', 'created_at', 'updated_at'], 'integer'],
              [['username', 'auth_key', 'password_hash', 'password_reset_token', 'email'], 'safe'],
          ];
      }
  
      /**
       * @inheritdoc
       */
      public function scenarios()
      {
          // bypass scenarios() implementation in the parent class
          return Model::scenarios();
      }
  
      /**
       * Creates data provider instance with search query applied
       *
       * @param array $params
       *
       * @return ActiveDataProvider
       */
      public function search($params)
      {
          $query = User::find();
  
          $dataProvider = new ActiveDataProvider([
              'query' =&gt; $query,
          ]);
  
          $this-&gt;load($params);
  
          if (!$this-&gt;validate()) {
              // uncomment the following line if you do not want to any records when validation fails
              // $query-&gt;where('0=1');
              return $dataProvider;
          }
  
          $query-&gt;andFilterWhere([
              'id' =&gt; $this-&gt;id,
              'status' =&gt; $this-&gt;status,
              'created_at' =&gt; $this-&gt;created_at,
              'updated_at' =&gt; $this-&gt;updated_at,
          ]);
  
          $query-&gt;andFilterWhere(['like', 'username', $this-&gt;username])
              -&gt;andFilterWhere(['like', 'auth_key', $this-&gt;auth_key])
              -&gt;andFilterWhere(['like', 'password_hash', $this-&gt;password_hash])
              -&gt;andFilterWhere(['like', 'password_reset_token', $this-&gt;password_reset_token])
              -&gt;andFilterWhere(['like', 'email', $this-&gt;email]);
  
          return $dataProvider;
      }
  }
  </code></pre>