---
title: "Updating & deleting — Reviews for Laravel | Roundly"
description: "Edit reviews with UpdateReviewData, re-moderate on edit, soft-delete, restore and force-delete."
url: https://roundly-consulting.com/open-source/docs/reviews-for-laravel/updating-deleting
language: en
---

[All packages](https://roundly-consulting.com/open-source.md)

[Reviews for Laravel](https://roundly-consulting.com/open-source/docs/reviews-for-laravel.md)

# Updating & deleting

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

```php
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, and a review without a rating can’t be edited down to blank content — that throws InvalidReviewException::empty().
- 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 — then ReviewVerified (with the new state) when it really changes the verified flag.

## Deleting

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

$review->restore();         // Eloquent SoftDeletes — the review keeps its photos
$review->forceDelete();     // permanent — its photos and owner responses go too
```

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, force-deletes its owner responses (live and soft-deleted) through Eloquent so each runs its own hooks, and clears its photos bucket. A query-builder delete fires neither hook: once cascade\_review\_responses\_on\_delete has run, the parent\_id key cascades its responses, but no photo is purged.

## 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](https://roundly-consulting.com/support-us.md)

By donating, you agree to our [donation terms](https://roundly-consulting.com/donation-terms.md).

[Support our open source work (opens in a new tab)](https://donate.stripe.com/dRmeVe8FX5PF1Qd9pXcEw00) [Join us on Patreon (opens in a new tab)](https://www.patreon.com/cw/roundly)

## 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.

[Get a quote in 48 hours](https://roundly-consulting.com/contact.md) [Browse all packages](https://roundly-consulting.com/open-source/docs/reviews-for-laravel.md)
