Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Laravel Moderation Laravel Package

hootlex/laravel-moderation

A Laravel package for moderating Eloquent models. Add moderation to any model with a trait, then approve, reject, or mark records pending using simple methods, query scopes, and events. Includes customizable status columns and support for filtering moderated content.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit. Unchanged. The package remains a thin Moderatable trait on Eloquent models plus a polymorphic moderations table recording decision (pending/approved/rejected), moderator, and timestamps. It composes through traits, hangs off Eloquent relations, and exposes scopes and events rather than inventing a parallel abstraction — idiomatic Laravel, conceptually compatible with almost any codebase. The domain limitation is untouched: this is a binary, single-stage state machine. Multi-stage review, quorum approval, reason codes, appeals, and SLA timers still have storage primitives but no workflow.

Integration feasibility. Still the gating issue, but v1.1.0 sharpens the picture rather than changing the verdict. Two additions:

  • Auto-discovery removes manual service-provider registration. That is a real friction reduction — but auto-discovery is a Laravel 5.5 feature, so it narrows the effective floor to Laravel 5.5–5.x. The package is now explicitly a 5.5/5.6-era artifact, not a 5.0–5.4 one.
  • PHP 7.1 and 7.2 support establishes the ceiling as clearly as it establishes the floor. There is no 7.3+, and by extension no path to PHP 8.x — which is the runtime every maintained Laravel LTS (9/10/11/12) requires. This release confirms the compatibility boundary; it does not move it.

Feasibility remains conditional: viable only inside a frozen Laravel 5.5/5.6 application on PHP 7.2 or below.

Technical risk. Low complexity, high staleness — unchanged, and if anything reinforced. A release that stops at PHP 7.2 is a release that was tracking the then-current runtime; nothing in these notes addresses modern Eloquent, typed properties, return types, or helper/Str API drift. There is still no upstream maintenance signal beyond this, no security response channel, and no downstream adoption (zero registered dependents despite 528 stars). Auto-discovery slightly reduces install effort but does nothing for the "you are the maintainer the moment you install it" conclusion — it arguably makes it easier to install something you will later have to own.

Key questions. Substantively the same set, with one addition:

  • What Laravel and PHP versions must this run against — is there a frozen 5.5/5.6 surface on PHP ≤7.2, or is this greenfield?
  • Is the moderation state strictly binary and single-stage, or does the roadmap include escalation, quorum, or appeals?
  • Where does the authoritative status live — derived from the moderations relation, or denormalized onto the parent row for query performance?
  • Who acts as moderator (admin panel, Nova/Filament, internal tooling), and is there a compliance requirement for an immutable audit trail?
  • Do we need notifications, queues, and reason/comment capture on decisions, or is the flag alone sufficient?
  • Multi-tenant or soft-delete interactions: does a moderation record survive parent deletion, and is it scoped per tenant?
  • New: if we take the legacy install path, does auto-discovery interact correctly with our provider registration order and any package-discovery cache in CI? Verify rather than assume — discovery quirks are a class of failure that surfaces only on a cold boot.

Integration Approach

Stack fit. Conceptually strong, version-wise poor — unchanged. v1.1.0 improves the ergonomics of installing into the era it targets (auto-discovery means less boilerplate in a 5.5/5.6 app) without closing any of the distance to a modern stack. The trait-plus-polymorphic-table pattern is still exactly how a Laravel team would build this today; the shipped code is still years behind the framework it targets, and now with a declared PHP ceiling to prove it.

Migration path. Recommend adopting the design, not the dependency — this conclusion is unaffected. Reimplement as a first-party Moderatable trait with a moderations migration, an enum-backed status column, Eloquent events on transition, and a policy for who may decide. Small, well-understood build (2–4 developer-days including tests) yielding code your team can extend into multi-stage workflow later without a fork. The package serves as a reference implementation and a schema sanity check — and v1.1.0 does not change that role.

If a legacy Laravel 5.5/5.6 app must ship quickly, the pinned-install-behind-an-adapter path remains valid and is now marginally cheaper: auto-discovery removes provider wiring, so budget 1–2 days to install, audit, and wrap. The standing obligation to carry the fork is unchanged. Note the tighter floor — if the target app is on 5.0–5.4, this release does not help you and you should treat the package as pre-5.5 code with manual registration.

Compatibility. Verify in a spike before committing: Composer constraint resolution against your pinned Laravel and PHP 7.2 ceiling; behavior under package-discovery caching and config caching; scope behavior with eager loading and pagination. Do not accept "it installed" as evidence of compatibility — auto-discovery in particular makes installation look clean right up until a cached-boot path fails.

Sequencing. Unchanged:

  1. Lock the state model and naming with product (states, transitions, who may act, what is recorded).
  2. Ship the migration and trait with a denormalized status on the parent model for cheap filtering.
  3. Add the decision surface (admin UI or API) guarded by a policy.
  4. Layer notifications and queue-driven side effects on transition events.
  5. Add audit retention and metrics (pending queue depth, time-to-decision).

Operational Impact

Maintenance. Unchanged. An in-house trait is a few hundred lines with tests — negligible steady state, full control. A fork of an abandoned package remains the worst option: same maintenance burden plus divergence overhead from an upstream that will never merge your patches. Auto-discovery does not alter this; it only changes how the package attaches itself before you start patching it.

Support. No vendor, no active maintainer. The v1.1.0 notes are a maintenance signal from the past, not a present-tense one — do not read them as evidence of an active upstream. Community answers for a 5.5/5.6-era package will be sparse and themselves stale. Plan for internal ownership regardless of path.

Scaling. Unchanged. The write path is trivial — one row per moderation action. Scaling risk is read-side: if status is derivable only through the polymorphic relation, every "show me pending posts" query becomes a join or an N+1. Denormalize status onto the parent row and index (status, created_at) and (moderatable_type, moderatable_id). Moderation queues are low-volume and admin-facing; query shape, not throughput, is the constraint.

Failure modes.

  • No moderation row means undefined state — enforce a default at creation, not at read.
  • Concurrent approve/reject by two moderators: without a guard you get last-write-wins and a confusing audit trail. Use optimistic locking or a transition check inside a transaction.
  • Polymorphic orphans when a parent is hard-deleted; decide cascade vs. retain for audit and encode it.
  • Listener failures on transition events silently swallowing notifications — decouple side effects onto a queue.
  • Scope drift: approved() scopes that omit legacy rows created before the feature shipped.
  • New: package-discovery and config-cache drift in CI/CD — a provider that resolves on a warm local boot but not on a cold deploy. Pin and test the boot path explicitly if you take the install route.

Ramp-up. Very low for any Laravel developer — hours to understand the pattern, a day to reimplement competently. v1.1.0 does not change that, and its PHP 7.2 ceiling is a useful shorthand to communicate the package's vintage to the team. The real ramp-up cost remains organizational: agreeing on the state machine and audit requirements before code exists, which is where a TPM should spend the time.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
abbasudo/artisan-route
mirvan/ippanel
ignibyte/aic-framework
glavweb/data-schema-bundle
glavweb/datagrid-bundle
tacticmedia/scim-server
uni-method/frame
neika-ai/sdk
adachsoft/php-code-style
pharaonic/laravel-notification-dependencies
beautinow/translug
dev-brainiac/bot-cloaked
octoberrain/html
octoberrain/extension
octoberrain/exception
octoberrain/contracts
adachsoft/api-version-bundle
cgv/localized-resource
noith/settings
kda/laravel-package