NewWe open-sourced 50+ Laravel packages
Custom AI apps, agents and automation — Roundly ConsultingRoundly
All packages
Reviews for Laravel

JSON resource

ReviewResource (and ReviewCollection) expose a sensible public shape for API and mobile clients:

use RoundlyConsulting\Reviews\Http\Resources\ReviewResource;

return ReviewResource::collection($product->approvedReviews()->with('responses')->get());
FieldValue
id / parent_idReview key; parent key for owner responses.
rating / status / verifiedScore (or null), status string, verified flag.
title / contentThe review text.
helpful_count / unhelpful_count / helpful_scoreVote tallies and their difference.
author / reviewableEach as a { type, id } pair.
responsesNested ReviewResource items — only when the relation is loaded.
photosA list of { id, url, srcset }, signed when photos are private.
created_at / updated_at / approved_atISO 8601 strings.

meta is deliberately not exposed, so internal notes and rejection reasons stay private. Photo URLs follow the photo visibility — signed for private photos, never public.

Paginated collections

use RoundlyConsulting\Reviews\Http\Resources\ReviewCollection;

return new ReviewCollection(
    $product->approvedReviews()->latestFirst()->paginate(10),
);

Customising

Publish editable copies — App\Http\Resources\Reviews\ReviewResource and ReviewCollection in app/Http/Resources/Reviews, app-namespaced classes you own that start out rendering exactly what the package’s resource does:

# Translations → lang/vendor/reviews
php artisan vendor:publish --tag="reviews-translations"

# JSON resources → app/Http/Resources/Reviews
php artisan vendor:publish --tag="reviews-resources"

Edit them, and use them in your controllers instead of the package classes:

use App\Http\Resources\Reviews\ReviewResource;

return ReviewResource::collection($product->approvedReviews()->with('responses')->get());

Show your open-source love

This package is free and MIT-licensed. If it saves you time, a one-off donation or a Patreon membership keeps it maintained, tested and documented.

More ways to support, including crypto

By donating, you agree to our donation terms.

Want this built into your product?

We integrate our packages into custom Laravel and AI builds. Tell us what you're working on and we'll reply within 48 hours.