---
title: "Reports for Laravel — docs | Roundly"
description: "Developer docs for Reports for Laravel: typed reasons, guarded status lifecycle, guest reports, duplicate prevention, thresholds and moderator sign-off."
url: https://roundly-consulting.com/open-source/docs/reports-for-laravel
language: en
---

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

Open source

# Reports for Laravel

Install

`composer require roundly-consulting/reports-for-laravel`

Requires: PHP ^8.4 · Laravel ^12.0|^13.0

[GitHub](https://github.com/roundly-consulting/reports-for-laravel) [Packagist](https://packagist.org/packages/roundly-consulting/reports-for-laravel) [Donate (opens in a new tab)](https://donate.stripe.com/dRmeVe8FX5PF1Qd9pXcEw00) [Patreon](https://www.patreon.com/cw/roundly)

## Overview

A content-moderation and flagging foundation for Laravel. Let any model file reports — or let guests report anonymously — against any reportable model, tag each report with a typed reason and move it through a guarded status lifecycle, with optional multi-moderator sign-off. Duplicate prevention, aggregation scopes, threshold escalation and lifecycle events come built in, behind a fluent facade with Action classes and DTOs underneath. Native and MIT-licensed, it builds only on Laravel and our own approvals, enums and package-toolkit packages — no third-party dependencies.

### What you get

#### Report anything, from anyone

GivesReports and HasReports turn any Eloquent model into a reporter or a reportable subject — guests can report too, keyed by a hashed identifier.

#### Typed, extensible reasons

A Reason enum with ready-made labels and select options, plus your own custom slugs validated against a config allow-list.

#### Guarded status lifecycle

Pending → in review → resolved or rejected → closed, enforced by a transition table that records who settled each report, when and why.

#### Multi-moderator sign-off

Route decisions through approvals-for-laravel — unanimous, quorum, any or weighted — and the report settles itself once the bar is met.

#### Duplicate prevention & insights

Block repeat reports from the same reporter or guest, count reports per subject and sort content by most reported.

#### Threshold escalation & events

ReportThresholdReached fires when a subject hits your threshold, alongside events for every creation, status change and decision.

#### Facade, DI or actions

One Reports facade, the injectable ReportsManager or six single-purpose actions — and a recording Reports::fake() for your tests.

### Documentation

#### [Installation](https://roundly-consulting.com/open-source/docs/reports-for-laravel/installation.md)

Install via Composer, publish the config if you change the table or key type, then publish and run the publish-only reports and approvals migrations.

#### [Configuration](https://roundly-consulting.com/open-source/docs/reports-for-laravel/configuration.md)

Every config key and its default — model, table, key type, reasons, duplicate prevention, strict transitions, threshold, pruning and moderation.

#### [Database schema & key types](https://roundly-consulting.com/open-source/docs/reports-for-laravel/database-schema.md)

The reports table column by column, its indexes, and how key\_type and primary\_key\_type pick bigint, UUID or ULID columns.

#### [Preparing your models](https://roundly-consulting.com/open-source/docs/reports-for-laravel/preparing-models.md)

Add GivesReports to models that file reports and HasReports to models that can be reported; Reporter and Reportable are optional markers.

#### [The Reports facade](https://roundly-consulting.com/open-source/docs/reports-for-laravel/facade.md)

One facade for filing, reviewing, settling, moderating and pruning reports, plus the reason reads — with builders for filing and moderation.

#### [DI, actions & DTOs](https://roundly-consulting.com/open-source/docs/reports-for-laravel/actions-dtos.md)

Inject ReportsManager instead of calling the facade, or run one of six Action classes with readonly DTOs from jobs and services.

#### [Filing reports](https://roundly-consulting.com/open-source/docs/reports-for-laravel/filing-reports.md)

File reports through the fluent Reports facade or the GivesReports trait — subject, reporter, typed reason and description in one chain.

#### [Guest & anonymous reports](https://roundly-consulting.com/open-source/docs/reports-for-laravel/guest-reports.md)

Accept reports from visitors who aren’t signed in, deduplicated by a hashed IP or email identifier.

#### [Reasons](https://roundly-consulting.com/open-source/docs/reports-for-laravel/reasons.md)

Typed report reasons via the Reason enum, custom slugs in config, and the facade’s reason reads — slug => label, defaults and allow checks.

#### [Status lifecycle](https://roundly-consulting.com/open-source/docs/reports-for-laravel/status-lifecycle.md)

Five statuses and a transition table — move reports with Reports::review(), close() or changeStatus(), guarded by strict\_transitions.

#### [Resolving & rejecting](https://roundly-consulting.com/open-source/docs/reports-for-laravel/resolving-reports.md)

Settle a report with Reports::resolve() or reject(), recording the moderator, a timestamp and a note, and firing the matching event.

#### [Multi-moderator moderation](https://roundly-consulting.com/open-source/docs/reports-for-laravel/moderation.md)

Require several moderators to sign off — unanimous, quorum, any or weighted — before a report settles, powered by approvals-for-laravel.

#### [Duplicate prevention](https://roundly-consulting.com/open-source/docs/reports-for-laravel/duplicate-prevention.md)

Stop the same reporter or guest from reporting a subject twice — scoped to open reports or to every report ever filed.

#### [Aggregation & querying](https://roundly-consulting.com/open-source/docs/reports-for-laravel/aggregation.md)

Count reports per subject, check who reported what, and sort or filter subjects by report count with ready-made scopes.

#### [Threshold auto-actions](https://roundly-consulting.com/open-source/docs/reports-for-laravel/thresholds.md)

Fire ReportThresholdReached when a subject’s open report count hits your threshold — auto-hide content, alert moderators, or both.

#### [The Report model](https://roundly-consulting.com/open-source/docs/reports-for-laravel/report-model.md)

Report attributes, relations, scopes and soft deletes — and how to swap in your own Report subclass.

#### [Events](https://roundly-consulting.com/open-source/docs/reports-for-laravel/events.md)

Five events cover creation, status changes, resolution, rejection and threshold crossings — the same whether settled directly or via moderation.

#### [Artisan commands](https://roundly-consulting.com/open-source/docs/reports-for-laravel/commands.md)

Prune old settled reports, list per-subject open report counts, and inspect the active configuration with php artisan about.

#### [Exceptions](https://roundly-consulting.com/open-source/docs/reports-for-laravel/exceptions.md)

The typed exceptions the package throws — all extending ReportsException — and the context each one carries.

#### [Testing](https://roundly-consulting.com/open-source/docs/reports-for-laravel/testing.md)

Reports::fake() records every mutating call instead of running it, with an assertion per verb — plus a factory state for every lifecycle stage.

#### [Requirements](https://roundly-consulting.com/open-source/docs/reports-for-laravel/requirements.md)

PHP 8.4+ and Laravel 12 or 13; approvals, enums and package-toolkit are installed automatically as dependencies.

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