Download the PHP package phoenix1331/laravel-clorian without Composer

On this page you can find all versions of the php package phoenix1331/laravel-clorian. 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-clorian

Clorian

Clorian (KLOR-yan) is Welsh for scales (as in weighing).

Confidence-aware typed decisions for Laravel: let Jev make the obvious calls, send the unsure ones to a person, and measure when to trust it more.

Tests Static analysis Release Licence

Plenty of decisions in an app come down to reading some text. Clorian turns that text into typed answers your code can act on, for any Eloquent model or any input:

A policy declares the questions. Jev, TypeSafe's typed decision model, answers all of them in one call with a probability for every option. Each answer is checked against its own thresholds: confident answers apply themselves, unsure ones wait for a person, the rest fall back to your defaults. Every human review is recorded, so Clorian can tell you when an answer has earned more trust.

Full documentation: phoenix1331.github.io/laravel-clorian, including a worked example built on it.

Why

A model can read text, but some of its answers will be wrong, and a label alone does not tell you which. Clorian puts a threshold on every answer and keeps score.

Installation

Requires PHP 8.3+ and Laravel 12 or 13.

  1. Install the package from Packagist:

  2. Publish the config and migrations. The installer asks whether to weigh models queued or sync, then runs migrate:

  3. Add your TypeSafe key to .env:

  4. Check the key with one sample call, then pin JEV_MODEL to the version it reports: jev-latest moves without notice, which shifts confidences and invalidates calibration.

  5. In queued mode, run a queue worker as you would for any queued job:

Then add #[Weigh] and HasWeighings to a model and write its policy, as in Usage. To try it without a key, set CLORIAN_DRIVER=fake.

Clorian is pre-1.0, so Composer pins ^0.1 and a minor release may include breaking changes. Read the changelog before upgrading.

How it works

The flow is the same for any model. Here it is with a support ticket:

  1. The ticket is saved. The HasWeighings trait has already registered Clorian's model listener; there is nothing to wire up.
  2. Clorian queues a job once the save commits (in sync mode it weighs during the save), redacts the #[Weigh] fields and asks Jev every question in the policy at once.
  3. Each answer is checked against its thresholds. Billing at 0.98 is accepted; normal urgency at 0.71 waits for a person.
  4. Your policy's apply() runs with the accepted answers and your defaults for the rest, and events fire for anything listening.
  5. A person reviews the urgency. apply() runs again with their decision, and the review counts towards calibration.
You want to Write Who calls it
Weigh a model when it is saved #[Weigh(...)] and use HasWeighings Clorian, on create and when those fields change
Change the model from the answers Your policy's apply() Clorian, after every weighing and every review
Notify, page someone, send a reply An event listener (optional) Laravel, when Clorian fires the event
Decide about data with no model Clorian::now() You, where the data arrives
Let people review answers Your own screen, calling Clorian::review() You: Clorian is headless

apply() runs after every weighing and every review, and again on weighNow() and clorian:rescan, so make it set values (a queue, a priority) that are safe to set twice. Put anything that must happen once, such as an email, in a listener.

Usage

The worked example routes support tickets. Mark the model with the policy that weighs it and the fields to send:

The policy declares the questions, the defaults for answers that cannot be trusted, and what to do with the result:

The model then gives you its history and a review queue:

For input with no model, weigh it while the visitor waits. Sync calls time out after 2 seconds and fall back to the defaults:

React to outcomes with ordinary listeners. AnswerAccepted, AnswerNeedsReview, AnswerReviewed and WeighingFailed fire after the save commits and carry ids and values, never the content.

Review and calibration

Record a human decision from your own UI; apply() runs again with it in place:

clorian:stats shows how often people agreed with Jev, by confidence band, and suggests an accept threshold once at least 30 reviews from a band upwards are upheld 95% of the time:

clorian:stats printing answer counts, upheld, overturned and missed rates, and upheld rates by confidence band

clorian:tune applies a threshold, showing the values before and after and asking first:

clorian:tune raising the accept threshold for low urgency from 0.75 to 0.85 after a confirm

Commands

Command What it does
clorian:install Publishes the config and any missing migrations, asks for the mode, prints the .env keys. Safe to run again
clorian:ping One sample call: whether the key is set, the version that answered, latency
clorian:stats {policy?} --days=30 Counts, review rates, rates by confidence band, suggested thresholds
clorian:tune {policy} {question} --option= --accept= --review= Changes a threshold after showing before and after; --accept=never always reviews
clorian:rescan {model} --since= --chunk=500 --sync Weighs existing models again, keeping human decisions on unchanged content
clorian:prune --pretend Deletes old weighings and those of deleted models, clears old stored input. Schedule it daily
clorian:add-column {table} Writes a migration for an indexed clorian_status column that pendingReview() reads, for busy apps

Configuration

config/clorian.php, published by clorian:install:

Key Default Environment variable
driver jev CLORIAN_DRIVER (jev, fake or your own)
drivers.jev.key none JEV_API_KEY
drivers.jev.model jev-latest JEV_MODEL
mode queued CLORIAN_MODE (queued or sync)
queue default CLORIAN_QUEUE
sync_timeout 2.0 seconds
store_input subjectless CLORIAN_STORE_INPUT (none, subjectless or always)
default_thresholds accept 0.90, review 0.60
calibration target 0.95, min_sample 30
prune weighings after 90 days, input after 30

The documentation lists every key.

Testing your app

Clorian::fake() swaps in a scripted driver. Weighings still run for real (thresholds, storage, apply()), nothing leaves your app, and every weighing is recorded:

Data and privacy

Clorian sends the #[Weigh] fields (or the input to Clorian::now()) and your policy's context() to TypeSafe, after redaction, with your key in the Authorization header only. It stores answers, confidences, thresholds and reviews; the input itself only as store_input allows, redacted and encrypted. Events, exceptions, logs and queued jobs never carry content. SECURITY.md sets out exactly what is sent and stored.

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 November 2026)

Contributing

See CONTRIBUTING.md, CHANGELOG.md and SECURITY.md. Clorian is a sibling of laravel-jev-moderation and shares its JEV_API_KEY and JEV_MODEL.

Licence

MIT. See LICENSE.md.


All versions of laravel-clorian with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
illuminate/bus Version ^12.0|^13.0
illuminate/console Version ^12.0|^13.0
illuminate/container 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
laravel/prompts Version ^0.3
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-clorian contains the following files

Loading the files please wait ...