---
title: "Threshold auto-actions — Reports for Laravel | Roundly"
description: "Fire ReportThresholdReached when a subject’s open report count hits your threshold — auto-hide content, alert moderators, or both."
url: https://roundly-consulting.com/open-source/docs/reports-for-laravel/thresholds
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)

# Threshold auto-actions

Set threshold to react when a subject collects enough open reports:

```php
// config/reports.php
'threshold' => 5,
```

ReportThresholdReached fires when a new report brings the subject’s open count (Pending plus InReview) to exactly the threshold — once per crossing: further reports past it don’t fire it again. Your app decides the action:

```php
use Illuminate\Support\Facades\Event;
use RoundlyConsulting\Reports\Events\ReportThresholdReached;

Event::listen(function (ReportThresholdReached $event): void {
    $event->subject->update(['is_hidden' => true]); // your app decides the action
    // $event->count, $event->threshold are also available
});
```

- The event carries subject (the reported model), count and threshold.
- The check runs whenever a report is filed through the facade, the GivesReports trait or CreateReportAction.
- Once resolving or rejecting reports drops the count below the threshold, the report that climbs back to it fires the event again.
- The count is taken when a report is filed — a reopened report raises it without firing.
- null (the default), a blank value (not set) or 0 disables it; anything else that is not a whole number throws InvalidConfigurationException when a report is filed.

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