modules/admin/models/ClientSearch.php
/**
     * Creates data provider instance with search query applied
     *
     * @param array $params
     *
     * @return ActiveDataProvider
     */
Creates data provider instance with search query applied
@param array $params


Creates data provider instance with search query applied @param array $params
public function search($params)
    {
        $query = ClientModel::find();
        $dataProvider = new ActiveDataProvider([
            'query' => $query,
        ]);
        $this->load($params);
        if (!$this->validate()) {
            return $dataProvider;
        }
        $query
            ->andFilterWhere(['like', 'id', $this->id])
            ->andFilterWhere(['like', 'login', $this->login])
            ->andFilterWhere(['like', 'role', $this->role])
            ->andFilterWhere(['like', 'user_code', $this->user_code])
            ->andFilterWhere(['like', 'email', $this->email])
            ->andFilterWhere(['like', 'phone', $this->phone])
            ->andFilterWhere(['like', 'supl_id', $this->supl_id])
            ->andFilterWhere(['like', 'activity', $this->activity])
            ->andFilterWhere(['like', 'service', $this->service])
            ->andFilterWhere(['like', 'town', $this->town])
            ->andFilterWhere(['like', 'courier_base', $this->courier_base])
            ->andFilterWhere(['like', 'receiver_name', $this->receiver_name])
            ->andFilterWhere(['like', 'receiver_phone', $this->receiver_phone])
            ->andFilterWhere(['like', 'user_name', $this->user_name]);
        return $dataProvider;
    }
public function search ( $ params ) { $ query = ClientModel :: find ( ) ; $ dataProvider = new ActiveDataProvider ( [ 'query' => $ query , ] ) ; $ this -> load ( $ params ) ; if ( ! $ this -> validate ( ) ) { return $ dataProvider ; } $ query -> andFilterWhere ( [ 'like' , 'id' , $ this -> id ] ) -> andFilterWhere ( [ 'like' , 'login' , $ this -> login ] ) -> andFilterWhere ( [ 'like' , 'role' , $ this -> role ] ) -> andFilterWhere ( [ 'like' , 'user_code' , $ this -> user_code ] ) -> andFilterWhere ( [ 'like' , 'email' , $ this -> email ] ) -> andFilterWhere ( [ 'like' , 'phone' , $ this -> phone ] ) -> andFilterWhere ( [ 'like' , 'supl_id' , $ this -> supl_id ] ) -> andFilterWhere ( [ 'like' , 'activity' , $ this -> activity ] ) -> andFilterWhere ( [ 'like' , 'service' , $ this -> service ] ) -> andFilterWhere ( [ 'like' , 'town' , $ this -> town ] ) -> andFilterWhere ( [ 'like' , 'courier_base' , $ this -> courier_base ] ) -> andFilterWhere ( [ 'like' , 'receiver_name' , $ this -> receiver_name ] ) -> andFilterWhere ( [ 'like' , 'receiver_phone' , $ this -> receiver_phone ] ) -> andFilterWhere ( [ 'like' , 'user_name' , $ this -> user_name ] ) ; return $ dataProvider ; }
Creates data provider instance with search query applied
 @param array $params
Creates data provider instance with search query applied @param array $params
//->andFilterWhere(['like', 'columns', $this->columns]) //->andFilterWhere(['like', 'hide_art', $this->hide_art])