illuma-law / laravel-content-sentinel
A configurable content safeguard and moderation pipeline for Laravel.
Package info
github.com/eloquage/laravel-content-sentinel
pkg:composer/illuma-law/laravel-content-sentinel
Fund package maintenance!
Requires
- php: ^8.3
- filament/support: ^4.0||^5.0
- illuminate/contracts: ^11.0||^12.0||^13.0
- illuminate/pipeline: ^11.0||^12.0||^13.0
- illuminate/support: ^11.0||^12.0||^13.0
- spatie/laravel-model-states: ^2.10
- spatie/laravel-package-tools: ^1.16
Requires (Dev)
- larastan/larastan: ^3.0
- laravel/pint: ^1.14
- mrpunyapal/peststan: ^0.2.12
- nunomaduro/collision: ^8.8
- orchestra/testbench: ^10.1
- pestphp/pest: ^4.0
- pestphp/pest-plugin-arch: ^4.0
- pestphp/pest-plugin-laravel: ^4.0
- phpstan/extension-installer: ^1.4
- phpstan/phpstan-deprecation-rules: ^2.0
- phpstan/phpstan-phpunit: ^2.0
- spatie/laravel-ray: ^1.35
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-10-23 14:03:31 UTC
README
A configurable pipeline for checking user or AI generated content before you save or publish it.
Requires PHP 8.3+, Laravel 11–13, Filament Support 4 or 5, and Spatie Laravel Model States 2.10+.
Install
composer require illuma-law/laravel-content-sentinel php artisan vendor:publish --tag=content-sentinel-config
The published config selects the gates and their settings. Built-in gates check prohibited phrases, brand voice, duplicate content, sensitive topics, and claims with a fact checker.
Check content
use IllumaLaw\ContentSentinel\DTOs\SentinelPayload; use IllumaLaw\ContentSentinel\Facades\ContentSentinel; $result = ContentSentinel::check(new SentinelPayload( content: 'Our product is guaranteed to work!', title: 'Product launch', metadata: ['author_id' => 123], )); if ($result->hasBlocks()) { abort(422, 'This content cannot be published.'); } if ($result->hasWarnings()) { logger()->warning('Content needs review', $result->warnings); } // Save or publish the content.
Blocked content should be stopped by your application. Warnings are returned for your application to send to a moderation queue or reviewer.
Test
composer test
composer analyse
vendor/bin/pint --test
MIT licensed. See LICENSE.
