backend/models/search/HotelRoomSearch.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 = HotelRoom::find();
        $dataProvider = new ActiveDataProvider([
            'query' => $query,
        ]);
        if (!($this->load($params) && $this->validate())) {
            return $dataProvider;
        }
        $query->andFilterWhere([
            'id' => $this->id,
            'price' => $this->price,
        ]);
        $query->andFilterWhere(['like', 'thumbnail', $this->thumbnail]);
        return $dataProvider;
    }
public function search ( $ params ) { $ query = HotelRoom :: find ( ) ; $ dataProvider = new ActiveDataProvider ( [ 'query' => $ query , ] ) ; if ( ! ( $ this -> load ( $ params ) && $ this -> validate ( ) ) ) { return $ dataProvider ; } $ query -> andFilterWhere ( [ 'id' => $ this -> id , 'price' => $ this -> price , ] ) ; $ query -> andFilterWhere ( [ 'like' , 'thumbnail' , $ this -> thumbnail ] ) ; return $ dataProvider ; }
Creates data provider instance with search query applied
 @param array $params
Creates data provider instance with search query applied @param array $params