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

Eloquence Laravel Package

ingenious/eloquence

Eloquence extends Laravel's Eloquent ORM with ready-made traits such as Sluggable, Mutable, Mappable, Recursive, and Metable, adding slugs, custom casts, array access, and self-referencing relationships to your models with minimal boilerplate.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit

eloquence is not a framework or a platform — it's a grab-bag of opt-in Eloquent traits (Mappable, Mutatable, Sluggable, Searchable, Sortable, Metable, Cacheable, Recursive, Brutal, Extendable). Each trait is mixed into individual models, so adoption is granular and non-invasive at the app-architecture level.

Fit is therefore entirely dependent on which capabilities we actually need, and whether the Eloquent version underneath still exposes the internals these traits hook into. The traits override core model behaviour (getAttribute, setAttribute, newQuery, toArray) and add query scopes — that is a tight coupling to Eloquent internals rather than to a documented extension point.

Several traits now overlap with first-party Laravel features that did not exist when this package shipped: native attribute casting/accessors (Laravel's Attribute class), Scout for search, JSON columns for metadata. The package's marginal value is highest where Laravel still has no native equivalent: Mappable (DB column → differently-named attribute with casts), Sluggable with uniqueness handling, and the Sortable query-string convention.

Integration feasibility

Composer-installable and incrementally adoptable per model, which is the package's main practical advantage. The blocker is version constraints: this library tracked Laravel 5.x, and its last release predates Laravel 6. Installing it on Laravel 9/10/11 will almost certainly require a fork with widened illuminate/* constraints and patched trait code. Verify the actual composer.json ranges before estimating anything else — that single line determines whether this is a half-day spike or a multi-sprint fork maintenance commitment.

Technical risk — high

  • Abandonment: no release since 2019-09-24, roughly six years. No active security-response process; expect a Packagist "abandoned" flag or equivalent signalling.
  • PHP 8 incompatibility: implicit nullable parameters, dynamic properties, and missing return types will trigger deprecations or fatals on modern PHP.
  • Silent breakage: because traits override Eloquent internals, a Laravel minor upgrade can change behaviour without an exception — mapped attributes silently returning raw columns is a realistic and hard-to-detect failure.
  • Composition conflicts: Brutal, Mappable, and Mutatable overlap by design; combining them or pairing them with other attribute-manipulating packages produces ordering-dependent behaviour.
  • Adoption signal: 1,079 stars is healthy interest, but the recorded dependents count of 0 suggests the current release has effectively no downstream ecosystem pressure — nobody is being forced to keep it working.

Key questions to resolve before committing

  1. Which Laravel and PHP versions must we support in 12/24 months?
  2. Which specific traits do we need — one, three, or the whole set?
  3. Can we tolerate owning a vendored fork (MIT permits it), or is an unmaintained dependency disallowed by policy?
  4. Do we have native or alternative equivalents already in the codebase for search, sorting, and slugs?
  5. What is the package's actual test coverage, and does it run against the Eloquent version we use?

Integration Approach

Stack fit

Only a direct fit for Laravel 5.4–5.8-era applications. For anything L8+, treat it as a source of patterns to port, not a dependency to install. The traits are short and readable; reimplementing the two or three we need is usually cheaper than maintaining a fork, and removes the upgrade cliff entirely.

Migration / replacement path per capability

  • Mappable → native $casts plus Attribute accessors/mutators with column-name translation in the accessor.
  • Mutatable → native casts and Attribute objects.
  • Sluggable → model observer or saving hook using Str::slug, with a unique DB index and collision suffix logic.
  • Searchable → Laravel Scout (Meilisearch/Typesense) for anything beyond trivial datasets; otherwise a scoped query with explicit column allowlists.
  • Sortable → explicit allowlist of sortable columns in a query scope; do not accept arbitrary ?sort= column names.
  • Metable → JSON column with casts, or a proper child table if we need querying/indexing on metadata.
  • Cacheable → Cache::remember at the repository/query level, where invalidation is explicit.
  • Recursive → staudenmeir/laravel-adjacency-list or a recursive CTE.

Compatibility work if forking

Widen illuminate/* and php constraints; add return types and nullable markers; replace removed global helpers with Str/Arr facades; audit every overridden method signature against the target Eloquent version; add an integration test per trait per supported Laravel version. Budget for a CI matrix — without one, the fork rots immediately.

Sequencing

  1. Capability inventory: list which traits are actually proposed and by which team.
  2. Spike: install the package (or a two-hour fork patch) on the real target stack and exercise one model per trait.
  3. Decide fork-vs-reimplement on the spike's evidence, not on the star count.
  4. Land one trait in one model behind feature tests; measure. Expand only after a clean release cycle.
  5. Never adopt more than one trait family per PR — attribute-manipulation bugs are combinatorial.

Operational Impact

Maintenance

The dominant cost. If we fork, we own it: PHP and Laravel upgrade work, security triage, and bug fixes land on us with no upstream to lean on. If we install as-is, we inherit a dependency that will block our next framework upgrade. Either way, the true cost is not today's integration — it is the tax at every future Laravel major.

Support

No vendor, no SLA, no active maintainer engagement expected. Issue history is a reference archive, not a support channel. Onboarding depends on a 2019 README, so institutional knowledge must be written down deliberately: which traits are used, in which models, and what each override assumes about Eloquent.

Scaling characteristics

  • Searchable compiles to LIKE '%term%' — unindexed, full-table scans; unacceptable past low six-figure row counts.
  • Metable is EAV: joins and N+1 risk on listing pages unless eager-loaded.
  • Cacheable needs an explicit invalidation story; stale reads after writes are the default failure.
  • Sluggable requires a unique index and collision retry to survive concurrent writes.
  • Sortable and search inputs both need allowlisting — unvalidated ?sort= is a mild injection/DoS surface.

Failure modes to monitor

Silent attribute mapping drift after Laravel upgrades; slug collisions and 500s on concurrent inserts; cache staleness; fatal errors from trait signature mismatches surfacing at boot rather than in tests; Brutal bypassing $fillable and enabling mass-assignment of sensitive columns.

Ramp-up

Low for a competent Laravel developer — the traits are idiomatic and small. The real ramp-up is forensic: the second engineer to touch a model using Mappable has to reverse-engineer why first_name appears as firstName in one place and not another. Estimate one to two days of documentation and test-hardening per trait adopted, plus the ongoing fork-maintenance line item.

Recommendation posture

Treat eloquence as a reference implementation. Adopt at most one or two traits if and only if a spike on the target Laravel version is clean; otherwise port the two behaviours we actually need (mapping and slugs) into first-party code in under a sprint and avoid the dependency entirely. The opportunity score of 4.5 is consistent with this: real utility, but the maintenance risk now exceeds the convenience.

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.
payerurl/telegrambot-crypto-payment-instant-payout
dskripchenko/laravel-hybrid-search
riorizkyrainey/lara-ced
mehedimi/static-vel
zharp/zharp
nonsapiens/bigquery-model-sync
lgu-bayambang-ict-office/lgu-laravel-development-standards
andydefer/laravel-support
se7enxweb/flysystem
lampwick/laravel
jeslage/statamic-emojis
micahdshackelford/rmap-laravel
draftsmaninc/draftsman
square-bit/laravel-volition
himito/laravel-mailman
htinlynn/genius-helper
maco-studios/hephaestus
elmogy/larafast
xeviant/laravel-paystack
gorilladash/laravel-website-sdk