PHPackages                             syriable/laravel-casework - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. syriable/laravel-casework

ActiveLibrary

syriable/laravel-casework
=========================

A UI-agnostic trust &amp; safety platform for Laravel: reports, moderation cases, decisions, enforcement, appeals, and an append-only audit trail.

1.0.1(1mo ago)02↓66.7%1MITPHPPHP ^8.3CI passing

Since Jul 16Pushed 1mo agoCompare

[ Source](https://github.com/syriable/laravel-casework)[ Packagist](https://packagist.org/packages/syriable/laravel-casework)[ Docs](https://github.com/syriable/laravel-casework)[ RSS](/packages/syriable-laravel-casework/feed)WikiDiscussions main Synced 2w ago

READMEChangelog (2)Dependencies (15)Versions (3)Used By (1)

Laravel Trust &amp; Safety (laravel-casework)
=============================================

[](#laravel-trust--safety-laravel-casework)

[![Latest Version on Packagist](https://camo.githubusercontent.com/10ecbeb120f2b72ebaad5f651f38d320fdd687a5675265368d56a6a63870afd6/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7379726961626c652f6c61726176656c2d63617365776f726b2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/syriable/laravel-casework)[![GitHub Tests Action Status](https://camo.githubusercontent.com/4941f348dc8640bbcdf5a4d9109b3e095b80bfe7c6a471280654b9dbe5967e80/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f7379726961626c652f6c61726176656c2d63617365776f726b2f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/syriable/laravel-casework/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/f7e325e24dc26a5a21146d426f82947359ca5fee89ff395ea0105dfd5b3e0e1e/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f7379726961626c652f6c61726176656c2d63617365776f726b2f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/syriable/laravel-casework/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/d302bbac3af3caca958da9976bf808fa07a71ce377c3a44432fb9d41d24e6b6d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7379726961626c652f6c61726176656c2d63617365776f726b2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/syriable/laravel-casework)

A complete, **UI-agnostic** moderation platform for Laravel: user reports, moderation cases, decisions, enforcement (restrictions, suspensions, warnings), appeals, and a tamper-evident audit trail — as composable domain operations with no views, routes, or opinions about your stack. You bring the UI; the package brings the workflow integrity.

Features
--------

[](#features)

- **Reporting** — fluent report filing with reasons-as-data, duplicate guards, anonymous/system origins, and configurable case-opening strategies
- **Reporter reputation** — opt-in per-reporter scoring that reacts to dismissed/upheld reports, with an optional block threshold and per-reporter rate limiting to blunt report-bombing
- **Case management** — cases with assignment, investigation, notes, evidence, priorities, and state machine-managed lifecycles
- **Decisions** — atomic decisions that resolve reports and apply enforcement in one transaction, with supersession chains instead of edits
- **Enforcement** — typed, scoped, expiring restrictions with a single-query `isRestricted()` hot path honoring expiry in real time
- **Appeals** — appeal windows and limits, independent-reviewer enforcement, and atomic overturns that lift restrictions and record superseding decisions
- **Audit** — one append-only entry per domain action; no unaudited path exists, from your code or the package's own automation
- **Events &amp; automation** — an after-commit event per action, a config-registered notifier hook, and intake/triage pipelines for ML scoring, auto-dismissal, and auto-assignment
- **Extensible without forking** — override models, rebind actions and guards, extend workflows (add-only, boot-validated), swap strategies and scope resolution

Installation
------------

[](#installation)

```
composer require syriable/laravel-casework
php artisan migrate
```

Requires PHP 8.3+ and Laravel 12+.

Reports classify against reasons-as-data, so create at least one reason before filing (idempotent, seeder-friendly):

```
php artisan casework:make-reason spam
```

Every config key has a working default. Publishing is optional:

```
php artisan vendor:publish --tag="casework-config"
php artisan vendor:publish --tag="casework-migrations"
```

See the [installation guide](docs/guide/installation.md) for key-type notes (bigint/ULID/UUID all supported) and the morph-map recommendation.

Quickstart
----------

[](#quickstart)

```
use Syriable\Casework\Facades\Casework;
use Syriable\Casework\Support\Outcome;

// Mark models: Reportable + InteractsWithReports,
//              Restrictable + InteractsWithRestrictions.

$report = Casework::report($post)
    ->by($user)
    ->because('spam')
    ->comment('Links to a phishing site')
    ->file();

$case = Casework::openCase($post)->bySystem()->open();

$decision = Casework::decide($case)
    ->by($moderator)
    ->outcome(Outcome::UPHOLD)
    ->withSuspension(days: 30)
    ->finalize();          // case + reports + restriction + audit, atomically

$user->isSuspended();      // one indexed query, expiry honored in real time

$appeal = Casework::appeal($decision)->by($user)->submit();
Casework::resolveAppeal($appeal)->by($reviewer)->overturn();
```

The [quickstart guide](docs/guide/quickstart.md) walks this end to end.

> **Why `CaseFile`?** The case entity is named `CaseFile` because `case` is a reserved word in PHP — everything else (tables, config, docs) still says "case".

Documentation
-------------

[](#documentation)

GuideCovers[Installation](docs/guide/installation.md)require, migrate, key types, morph map[Quickstart](docs/guide/quickstart.md)the full loop, end to end[Reporting](docs/guide/reporting.md)reports, reasons, duplicate rules[Cases &amp; decisions](docs/guide/cases-and-decisions.md)case ops, notes, evidence, deciding[Enforcement](docs/guide/enforcement.md)restrictions, warnings, expiry, the hot path[Appeals](docs/guide/appeals.md)windows, limits, independence, overturns[Audit](docs/guide/audit.md)querying history, immutability, pruning[Authorization](docs/guide/authorization.md)policies, scopes, self-moderation[Events](docs/guide/events.md)catalog, after-commit guarantee, notifiers[Automation](docs/guide/automation.md)intake/triage pipelines[Extending](docs/guide/extending.md)all fourteen extension points[Workflows](docs/guide/workflows.md)the four state machines[Configuration](docs/guide/configuration.md)every key, defaults, validation[Exceptions](docs/guide/exceptions.md)what throws, when[Testing your integration](docs/guide/testing-your-integration.md)factories, fakes, assertionsArchitecture decision records live in [docs/adr/](docs/adr/).

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [syriable](https://github.com/syriable)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

40

—

FairBetter than 85% of packages

Maintenance90

Actively maintained with recent releases

Popularity2

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 53.3% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~2 days

Total

2

Last Release

45d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/286110444?v=4)[syriable](/maintainers/syriable)[@syriable](https://github.com/syriable)

---

Top Contributors

[![claude](https://avatars.githubusercontent.com/u/81847?v=4)](https://github.com/claude "claude (40 commits)")[![alkhatibsy](https://avatars.githubusercontent.com/u/23545455?v=4)](https://github.com/alkhatibsy "alkhatibsy (34 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (1 commits)")

---

Tags

laravelAuditmoderationreportstrust-and-safetysyriableappealslaravel-casework

###  Code Quality

TestsPest

Static AnalysisPHPStan, Rector

Code StyleLaravel Pint

Type Coverage Yes

### Embed Badge

![Health badge](/badges/syriable-laravel-casework/health.svg)

```
[![Health](https://phpackages.com/badges/syriable-laravel-casework/health.svg)](https://phpackages.com/packages/syriable-laravel-casework)
```

###  Alternatives

[dedoc/scramble

Automatic generation of API documentation for Laravel applications.

2.2k14.2M151](/packages/dedoc-scramble)[spatie/laravel-pdf

Create PDFs in Laravel apps

1.0k6.1M53](/packages/spatie-laravel-pdf)[codewithdennis/filament-select-tree

The multi-level select field enables you to make single selections from a predefined list of options that are organized into multiple levels or depths.

331634.0k38](/packages/codewithdennis-filament-select-tree)[harris21/laravel-fuse

Circuit breaker for Laravel queue jobs. Protect your workers from cascading failures.

24795.1k](/packages/harris21-laravel-fuse)[vormkracht10/laravel-mails

Laravel Mails can collect everything you might want to track about the mails that has been sent by your Laravel app.

25263.1k](/packages/vormkracht10-laravel-mails)[rawilk/profile-filament-plugin

Profile &amp; MFA starter kit for filament.

3915.5k](/packages/rawilk-profile-filament-plugin)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
