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

Updating & deleting

Pass an UpdateReviewData with only the fields you want to change — null means “leave unchanged”:

use RoundlyConsulting\Reviews\DataTransferObjects\UpdateReviewData;
use RoundlyConsulting\Reviews\Facades\Reviews;

// Only the provided fields change; null means "leave unchanged".
Reviews::update($review, new UpdateReviewData(content: 'Edited', rating: 4));   // re-moderated

// Meta and verified alone aren't re-moderated:
Reviews::update($review, new UpdateReviewData(
    meta: collect(['visit' => 'lunch']),
    verified: true,
));
  • A new rating is validated against the configured range, exactly as on create.
  • An edit that changes the rating, title or content is re-moderated through the same pipeline as a new review: auto_approve, then the configured moderator. An approve or reject decision applies, firing ReviewApproved / ReviewRejected when the status changes.
  • An undecided outcome sends the review back to default_status (pending) and clears approved_at when reset_status_on_edit is on (the default), or keeps its current status when it is off — so a banned word can’t be edited into a live review either way.
  • Edits to meta or verified alone aren’t re-moderated. meta replaces the whole collection.
  • A rejected review stays rejected (reason kept) until you approve() it, and an owner response stays approved — it never enters the queue.
  • Every update fires ReviewUpdated.

Deleting

Reviews::delete($review);   // soft-deletes and fires ReviewDeleted

$review->restore();         // Eloquent SoftDeletes — the review keeps its photos
$review->forceDelete();     // permanent — its photos are cleared as well

Reviews use Eloquent soft deletes: Reviews::delete() hides the review from every query and aggregate while keeping the row and its photos. Force-deleting removes the row and clears its photos bucket.

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.