Download the PHP package phoenix1331/laravel-jev-moderation without Composer

On this page you can find all versions of the php package phoenix1331/laravel-jev-moderation. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-jev-moderation

Jev Moderation for Laravel

Confidence-aware content moderation for Laravel.

The Jev Moderation family: Jev Moderation classifies and records (this package) · Jev Moderation for Filament is where people review it, with a review queue and calibration widget

Add a trait to any Eloquent model. Every time it is saved, its content is classified by Jev, TypeSafe's typed decision model, and the probability of each risky category decides whether it passes, waits for a human, or is blocked.

Tests Static analysis Release Licence

A demo app listing forum posts and chat messages, each with a passed, flagged, blocked, approved or rejected status, the deciding category and probability, and its history of decisions.

Full documentation: phoenix1331.github.io/laravel-jev-moderation

Why

Most moderation APIs hand back a label. Jev answers a typed question with a probability for every choice, so a post that is 55% fine and 44% harassment shows up as borderline instead of quietly "fine". This package checks each risky category's probability against its own thresholds: a low bar to send something to a person, a high bar to remove it without one.

Installation

The install command publishes the config and the moderation_decisions migration, asks for the mode and default policy, and prints the .env keys to add. Get a key at typesafe.ai, then check everything works end to end:

The ping command listing models, classifying a sample as passed by jev-1.14.0, and warning that jev-latest is an alias

Usage

Mark a model with the fields to send and a policy:

Saving it records a pending decision and queues the check once the transaction commits, so run a queue worker. Set JEV_MODERATION_SYNC=true to check inline instead, for example before broadcasting a chat message. A save that leaves the moderated fields unchanged is not sent again.

Passing category: reclassifies: the content is removed and the moderator's category is recorded on their decision, checked against the model's policy so a typo cannot corrupt calibration data.

Check something without recording it:

Listen for ContentPassed, ContentFlagged, ContentBlocked, ContentReported, ReviewResolved and ModerationFailed. Each carries the model and the decision, so sanctions such as muting an author live in your listeners.

[!WARNING] Moderation runs on Eloquent's created and updated events. saveQuietly(), Model::withoutEvents(), raw inserts and seeders using WithoutModelEvents skip it, and Laravel's default DatabaseSeeder uses that trait. Remove it from seeders whose content should be checked, or run php artisan jev-moderation:rescan afterwards.

Policies and thresholds

A policy is one question, a set of choices with descriptions, and a rule per risky category. Three presets ship, community, chat and strict, and you can edit them in the published config:

Every category with a rule is checked, not just Jev's top choice, and the strongest action wins. A probability equal to a threshold counts as reaching it. uncertain_below flags answers where Jev was undecided.

The presets are checked against live Jev with a small labelled set (results). Jev is decisive on clear-cut content, so most clear cases reach block_above and are removed without a person. Set block_above to 1.0, or leave it out, for any category where a human must confirm every removal.

Modes

Latest status post (default) pre
never checked visible visible
pending, flagged visible hidden
passed, approved visible visible
blocked, rejected hidden hidden
failed (retries used up) visible with fail: open (default), hidden with fail: closed same

Commands

Command Does
jev-moderation:install Publish config and migration, choose mode and policy, print the .env keys
jev-moderation:ping Check the key and driver with one sample classification
jev-moderation:stats Decisions per status and category, and how often moderators upheld Jev, overturned it, or caught what it missed
jev-moderation:rescan {model} Re-check content after a threshold change; skips moderator decisions unless asked
jev-moderation:add-column {table} Add an indexed, backfilled moderation_status column for fast queries on busy tables

The rescan command counting blocked chat messages on a dry run, then re-checking them after confirmation

More recordings, for install and stats, are on the documentation site.

Configuration

The main .env keys:

Key Default
JEV_API_KEY none Your TypeSafe key
JEV_MODEL jev-latest An alias that moves when TypeSafe releases; pin a version such as jev-1.14.0 once your thresholds are tuned
JEV_MODERATION_MODE post post or pre
JEV_MODERATION_FAIL open Visibility of content whose check gave up
JEV_MODERATION_POLICY community Used when #[Moderate] names no policy
JEV_MODERATION_DRIVER jev fake answers locally
JEV_MODERATION_SYNC false Check inline instead of on the queue
JEV_MODERATION_STORE_CONTENT false Keep a copy of the content on each decision

Every option, with queue, retry and context settings, is in config/jev-moderation.php and on the documentation site.

Testing your app

Data and privacy

The #[Moderate] fields and any context are sent to TypeSafe on each check; nothing else about the model, and nothing at all with the fake driver. Decisions keep a sha256 hash of the content, not the content itself, unless store_content is on. There is no built-in erasure yet. SECURITY.md has the details, including how to delete a model's decisions.

Compatibility

Supported
PHP 8.3, 8.4, 8.5
Laravel 12, 13
Databases SQLite, PostgreSQL, MySQL, MariaDB
Jev Tested with jev-1.14.0 (what jev-latest points to as of October 2026)

Contributing

See CONTRIBUTING.md, CHANGELOG.md and SECURITY.md.

Licence

MIT. See LICENSE.


All versions of laravel-jev-moderation with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
illuminate/console Version ^12.0|^13.0
illuminate/contracts Version ^12.0|^13.0
illuminate/database Version ^12.0|^13.0
illuminate/http Version ^12.0|^13.0
illuminate/queue Version ^12.0|^13.0
illuminate/support Version ^12.0|^13.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package phoenix1331/laravel-jev-moderation contains the following files

Loading the files please wait ...