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

Earmark Laravel Package

poing/earmark

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Sequential ID/Value Generation: Enables customizable, gap-free sequences (e.g., phone extensions, ticket numbers, order IDs) without manual tracking.
  • Value Reuse & Recycling: Supports dynamic allocation/deallocation of values (e.g., temporary resources like test accounts, call queues, or inventory slots).
  • Concurrency Control: Built-in database locking prevents duplicate assignments in multi-user environments (critical for shared resources).
  • Cost Optimization: Reduces wasted IDs (e.g., abandoned carts, unused licenses) by recycling values instead of reserving a static range.
  • Roadmap Flexibility: Justifies "build vs. buy" for teams needing reusable sequences without reinventing locking/recycling logic.
  • Use Cases:
    • Telecom: Phone extensions, IVR menus.
    • E-commerce: Temporary promo codes, abandoned cart recovery.
    • SaaS: Trial licenses, sandbox environments.
    • Logistics: Dynamic bin/container assignments.

When to Consider This Package

  • Adopt if:
    • Your app requires reusable sequential values (not just auto-incrementing IDs).
    • You need atomic locking to prevent race conditions in high-concurrency scenarios.
    • Your current solution (e.g., manual MAX(id) + 1 queries) creates gaps or lacks recycling.
    • You’re using Laravel and want to avoid custom database logic.
  • Look elsewhere if:
    • You need strictly monotonically increasing IDs (e.g., for primary keys; use Laravel’s built-in incrementing).
    • Your sequences are static (no recycling needed; e.g., user IDs).
    • You require distributed locking (e.g., multi-DB or microservices; consider Redis-based solutions).
    • Your team lacks database migration comfort (package requires manual setup).

How to Pitch It (Stakeholders)

For Executives: "Earmark solves a hidden cost in our system: wasted sequential values. For example, if we assign phone extensions or promo codes but don’t reuse them when users cancel, we’re burning through our allocated range unnecessarily. This package lets us recycle those values dynamically—saving thousands in reserved capacity—while preventing duplicates in high-traffic scenarios. It’s a low-code, high-impact fix for efficiency."

For Engineering: *"This is a battle-tested Laravel package that handles two tricky problems for us:

  1. Gap-free sequences with value recycling (e.g., unset() to free up a phone extension).
  2. Thread-safe locking to avoid duplicate assignments in concurrent requests. It’s a drop-in replacement for custom SELECT MAX(id) + 1 logic, with the added benefit of configurable retries and deadlock handling. The migration is straightforward, and the MIT license means no vendor lock-in. I recommend evaluating it for [specific use case, e.g., call-center extensions] where we’ve seen ID bloat."*
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.
alphabalex/messaging-made-easy
rawphp/warp
shootkiran/merobug
narakode/fineauth
numencode/wn-syncops-plugin
ibnnajjaar/mib-global-pay
ably/pubsub-server
mstfkhazaal/defender
mfonte/base62x
karnoweb/metapilot
tobya/bcsapiwrapper
swalker2/cpanel
vish4395/laravel-translation-manager
morningtrain/economic
teksite/systeminfo-laravel
atomcms/voting
run6/weather
siokas/laravelembeddirectives
adamlien/pkuuids
gilsonsouza/lara-doc-generator