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

Require the package. The service provider is auto-discovered, and approvals-for-laravel, enums-for-laravel and package-toolkit-for-laravel are installed with it as dependencies:

composer require roundly-consulting/reports-for-laravel

Migrations are publish-only — the package never loads them, so a bare php artisan migrate creates no reports table until you have published the migration. Publish approvals-for-laravel’s migrations alongside it:

php artisan vendor:publish --tag="reports-migrations"
php artisan vendor:publish --tag="approvals-migrations"
php artisan migrate

Publish the config first when you change the schema

The migration reads table and key_type when it runs. If you need a custom table name or UUID/ULID morph keys, publish the config and set them before you publish and run the migration:

php artisan vendor:publish --tag="reports-config"

The only publish tags the package exposes are reports-config and reports-migrations.

Why the approvals tables are required

Multi-moderator sign-off stores its requests and decisions in approvals-for-laravel’s tables — and every report reads them, not only moderated ones. Reports::resolve(), reject() and any move to a terminal status first check $report->isUnderModeration(), which queries approval_requests. Skip the approvals migrations and Reports::resolve() throws a QueryException, even if you never call Reports::moderate().

Next steps

  • Add GivesReports to models that file reports and HasReports to models that can be reported.
  • File your first report through the Reports facade.
  • Decide your reasons, duplicate policy and escalation threshold in config/reports.php.

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.