- What Laravel and PHP versions does hootlex/laravel-moderation support?
- The package is a Laravel 5.5/5.6-era package. Its release notes indicate PHP 7.1 and 7.2 support, with auto-discovery requiring Laravel 5.5 or newer within the 5.x line. It does not declare support for PHP 7.3+ or PHP 8.x, so it is not compatible with maintained Laravel LTS releases such as Laravel 9, 10, 11, or 12.
- How do I install hootlex/laravel-moderation?
- Install it with Composer using composer require hootlex/laravel-moderation. In a Laravel 5.5/5.6 application, package auto-discovery should register the service provider without manual registration. Then apply the Moderatable trait to the Eloquent model you want to moderate. If your app disables discovery or has custom provider order, verify registration and clear any package-discovery cache in CI.
- How do I add moderation to an Eloquent model?
- Add the package's Moderatable trait to any Eloquent model. The trait gives you methods to mark the record pending, approved, or rejected, plus query scopes and Eloquent relationships for moderation history. The package stores moderation decisions in a polymorphic moderations table rather than requiring a parallel abstraction.
- What moderation states and workflow does hootlex/laravel-moderation support?
- It supports three states: pending, approved, and rejected. The workflow is a binary, single-stage state machine, so there is no built-in multi-stage review, quorum approval, appeals, or SLA timer workflow. Reason codes and comments may be storable, but the package does not provide a full review workflow around them. If you need escalated or multi-party moderation, you will need to build it yourself or choose a different approach.
- Does hootlex/laravel-moderation provide query scopes for pending, approved, and rejected records?
- Yes. The package includes query scopes for filtering moderated records by state, so you can list pending items for a moderator queue or fetch approved content for public views. These scopes work through Eloquent on models using the Moderatable trait.
- How does hootlex/laravel-moderation track moderators and moderation history?
- Each moderation action is recorded in the moderations table with the decision, the moderator relationship, and timestamps. The package exposes moderator relationships and moderation history through Eloquent, and the table and model options are configurable. For a compliance-grade immutable audit trail, verify the storage behavior and add your own controls if needed.
- Can I use hootlex/laravel-moderation with Laravel 10, Laravel 11, or PHP 8?
- No. The package tops out at PHP 7.2 and targets the Laravel 5.5/5.6 era, while Laravel 9, 10, 11, and 12 require PHP 8.x. There is no declared PHP 7.3+ or PHP 8.x support, so using it on a modern LTS is not a supported path. For modern Laravel, reimplement the trait and moderations table pattern in first-party code.
- Is hootlex/laravel-moderation maintained and safe for production?
- The package is low-complexity but high-staleness: releases stop at PHP 7.2, there is no visible upstream maintenance signal or security response channel, and it has zero registered dependents despite its stars. It is only viable inside a frozen Laravel 5.5/5.6 application on PHP 7.2 or below. If you install it, you should assume you are the maintainer and plan to own upgrades, security review, and compatibility fixes.
- Can I customize the moderation table or model?
- Yes. The package provides configuration for the moderation table and model options, so you can adapt naming to your application conventions. You should verify the exact config keys and migration assumptions in your version before relying on custom table names. If you customize the model, test the trait relationships, scopes, and moderator history queries together.
- What are the alternatives or migration path for hootlex/laravel-moderation?
- The recommended path is to adopt the design rather than the dependency: build a first-party Moderatable trait, a moderations migration, an enum-backed status column, Eloquent events on transition, and a policy for who may decide. That is a small, well-understood build estimated at two to four developer-days including tests. If you need multi-stage review, quorum approval, appeals, or SLA timers, evaluate actively maintained approval/workflow packages or build those states explicitly.