Skip to content

Commit

Permalink
Implemented the latest version of rapidez/reviews (#679)
Browse files Browse the repository at this point in the history
  • Loading branch information
JimmyHoenderdaal authored Jan 29, 2025
1 parent db03bee commit d10b528
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
3 changes: 3 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@
}
}
},
"conflict": {
"rapidez/reviews": "<3.0"
},
"scripts": {
"analyse": "phpstan --memory-limit=256M",
"dusk:prepare": [
Expand Down
3 changes: 3 additions & 0 deletions resources/views/listing/partials/item.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ class="mb-3 h-48 w-full rounded-t object-contain" :alt="item.name" :loading="con
<div class="text-sm line-through" v-if="item.special_price">@{{ item.price | price }}</div>
</div>
@endif
@if (App::providerIsLoaded('Rapidez\Reviews\ReviewsServiceProvider'))
<x-rapidez-reviews::stars v-if="item.reviews_count" count="item.reviews_count" score="item.reviews_score"/>
@endif
</div>
</a>
@include('rapidez::listing.partials.item.addtocart')
Expand Down
2 changes: 1 addition & 1 deletion resources/views/product/overview.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
@includeWhen($product->type_id !== 'grouped', 'rapidez::product.partials.addtocart')
@if (App::providerIsLoaded('Rapidez\Reviews\ReviewsServiceProvider'))
@if ($product->reviews_score)
<stars :score="{{ $product->reviews_score }}" :count="{{ $product->reviews_count }}"></stars>
<x-rapidez-reviews::stars :score="$product->reviews_score" :count="$product->reviews_count" />
@endif
@endif
<div>
Expand Down

0 comments on commit d10b528

Please sign in to comment.