diff --git a/common/models/CustomerSearch.php b/common/models/CustomerSearch.php index 91fce55..243402d 100644 --- a/common/models/CustomerSearch.php +++ b/common/models/CustomerSearch.php @@ -32,12 +32,22 @@ [ [ 'type', - 'rating', 'online', ], 'integer', ], [ + ['rating'], + 'number', + 'min' => 0, + 'max' => 5, + ], + [ + ['rating'], + 'default', + 'value' => 0, + ], + [ [ 'city', 'info', @@ -123,7 +133,7 @@ } $query->andFilterWhere([ - 'user_info.rating' => $this->rating, + '>=', 'user_info.rating', $this->rating, ]); $query->andFilterWhere([ diff --git a/frontend/views/search/_customer_list_view.php b/frontend/views/search/_customer_list_view.php index 783d37f..f6f86d2 100644 --- a/frontend/views/search/_customer_list_view.php +++ b/frontend/views/search/_customer_list_view.php @@ -52,7 +52,7 @@ } ?>