Search by

illuma-law / laravel-content-sentinel

miguelenes

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!

illuma-law

Statistics

Installs: 65

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 2

v1.0.0 2026-10-23 14:01 UTC

This package is auto-updated.

Last update: 2026-10-23 14:03:31 UTC


README

Laravel Content Sentinel moderation pipeline

A configurable pipeline for checking user or AI generated content before you save or publish it.

Tests Latest Version License

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.