---
title: "Moderation lifecycle — Reviews for Laravel | Roundly"
description: "Pending, approved and rejected statuses — approve and reject with reasons, build a moderation queue, use the status enum."
url: https://roundly-consulting.com/open-source/docs/reviews-for-laravel/moderation
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)

# Moderation lifecycle

Every review has a ReviewStatus of Pending, Approved or Rejected. New reviews are pending unless auto\_approve is enabled, the builder called approved(), or the moderator approved them.

```php
use RoundlyConsulting\Reviews\Facades\Reviews;

Reviews::approve($review);            // marks approved, stamps approved_at
Reviews::reject($review, 'Spam');     // marks rejected, stores the reason in meta

$review->isPending();
$review->isApproved();
$review->isRejected();

$review->meta?->get('rejection_reason'); // 'Spam'
```

- approve() sets the status to approved, stamps approved\_at and fires ReviewApproved.
- reject() sets the status to rejected, clears approved\_at, stores an optional reason under meta.rejection\_reason and fires ReviewRejected with that reason.
- Both are idempotent — approving an approved review (or rejecting a rejected one) changes nothing and fires no event.
- Approving a rejected review drops its stale rejection\_reason.
- A review that lands approved or rejected on create or after an edit fires the same events.

## A moderation queue

Reviews::query() covers every subject and respects a swapped reviews.model:

```php
use RoundlyConsulting\Reviews\Facades\Reviews;

// The moderation queue — every subject, oldest first, owner responses excluded:
$queue = Reviews::query()->pending()->topLevel()->oldest()->paginate(20);

// Or newest first, as the README does:
Reviews::query()->pending()->latestFirst()->paginate();
```

## Auto-approve

For trusted setups, REVIEWS\_AUTO\_APPROVE=true approves every new — and re-moderated, edited — review immediately and skips the moderator. To trust only some reviews, approve them per call with ->approved() on the builder.

## The status enum

ReviewStatus and ModerationDecision use the Enums for Laravel helpers, so you get values(), labels(), options(), toOptions(), validationRule(), readable() and case lookups for free:

```php
use RoundlyConsulting\Reviews\Enums\ReviewStatus;

$review->status;                       // ReviewStatus::Pending
$review->status->isApproved();         // bool

ReviewStatus::values();                // collect(['pending', 'approved', 'rejected'])
ReviewStatus::validationRule();        // 'in:pending,approved,rejected'
ReviewStatus::toOptions();             // value => label map for select inputs
ReviewStatus::Approved->readable();    // 'Approved'
```

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