---
title: "Installation — Reports for Laravel | Roundly"
description: "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."
url: https://roundly-consulting.com/open-source/docs/reports-for-laravel/installation
language: en
---

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

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

# Installation

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:

```bash
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:

```bash
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, key\_type and primary\_key\_type when it runs. If you need a custom table name, UUID/ULID morph keys or a UUID/ULID report id, publish the config and set them before you publish and run the migration:

```bash
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](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/reports-for-laravel.md)
