@@ -65,7 +65,7 @@ $rating = $post->rating([
6565 'customer_service_rating' => 5,
6666 'quality_rating' => 5,
6767 'friendly_rating' => 5,
68- 'price_rating ' => 5,
68+ 'pricing_rating ' => 5,
6969 'rating' => 5,
7070 'recommend' => 'Yes',
7171 'approved' => true, // This is optional and defaults to false
@@ -82,7 +82,7 @@ $rating = $post->updateRating(1, [
8282 'customer_service_rating' => 1,
8383 'quality_rating' => 1,
8484 'friendly_rating' => 3,
85- 'price_rating ' => 4,
85+ 'pricing_rating ' => 4,
8686 'rating' => 4,
8787 'recommend' => 'No',
8888 'approved' => true, // This is optional and defaults to false
@@ -107,6 +107,11 @@ $ratings = $post->getNotApprovedRatings($post->id, 'desc');
107107
108108// Get all ratings whether approved or not
109109$ratings = $post->getAllRatings($post->id, 'desc');
110+
111+ // Get the most recent ratings (limit and sort are optional)
112+ // Limit default is 5, sort default is desc
113+ $ratings = $post->getRecentRatings($post->id, 5, 'desc');
114+
110115```
111116### Fetch the average rating:
112117```` php
@@ -123,7 +128,7 @@ $post->averageQualityRating()
123128$post->averageFriendlyRating()
124129
125130// Get Price Average Rating
126- $post->averagePriceRating ()
131+ $post->averagePricingRating ()
127132
128133````
129134
0 commit comments