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 Lock Laravel Package

zaber-dev/laravel-lock

Application-level distributed locking for Laravel with entity-scoped locks, automatic owner detection, and cleanup. Use cache or database storage, attach locks to Eloquent models, and protect routes with middleware to prevent race conditions.

View on GitHub
Deep Wiki
Context7
v1.0.1

Laravel Lock now includes built-in AI support and architectural skills engineered for Laravel Boost.

When using AI coding assistants such as Cursor, Claude Code, or GitHub Copilot connected through the Boost MCP server, your AI agent can automatically load specialized design patterns and exact API conventions for implementing laravel-lock

Full Changelog: https://github.com/zaber-dev/laravel-lock/compare/v1.0.0.1...v1.0.1

v1.0.0.1

๐ŸŽ‰ Initial stable release of Laravel Lock.

Laravel Lock provides application-level distributed locking for Laravel, making it easy to prevent concurrent execution and race conditions across actions, workflows, jobs, and HTTP endpoints.

Unlike Laravel's low-level Cache::lock(), Laravel Lock offers a higher-level, entity-scoped API with automatic owner detection, Eloquent integration, middleware, interchangeable storage backends, and lifecycle events.

โœจ Features

  • ๐Ÿ”’ Application-level distributed locking

  • ๐Ÿ‘ค Automatic owner detection

  • โšก Expressive fluent API (Lock::for(...))

  • ๐Ÿ—„๏ธ Multiple storage backends

    • Cache (Redis, Memcached, Array)
    • Database
  • ๐Ÿงฉ Native Eloquent integration (HasLocks)

  • ๐Ÿ›ฃ๏ธ Route middleware

  • ๐Ÿ“ฆ Immutable LockInfo DTOs

  • ๐Ÿงน Automatic database pruning

  • ๐Ÿ”Œ Custom storage driver extensibility

  • ๐Ÿ“ข Lock lifecycle events

Example

Lock::for('billing_charge', $user)
    ->block(function () {
        // Critical section...
    });

Compatibility

  • Laravel 11
  • Laravel 12
  • Laravel 13+
  • PHP 8.2+

Documentation

  • README
  • LEARN.md (architecture guide)

Thank you for checking out Laravel Lock! Feedback, feature requests, and contributions are always welcome.

Full Changelog: https://github.com/zaber-dev/laravel-lock/commits/v1.0.0.1

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.
tequilarapido/trackit
gregsphotography/site-builder-filament
cabaoctavio/laravel-query-log
gregsphotography/site-builder-components
io-digital/clickatell
snowsoft/laravel-admin
oxygen/auth
relicsoftware/barakah-payment-gateway
tobya/work-with-composer
equipc/laravel-email-validator
equipc/laravel-email-database-log
adedsec/nova-translated-labels
wazza/laravel-db-encryption
hokny/laravel-generator
vonsogt/backup
jengo/queues
jeremykenedy/laravel-observability
coleus/frame
thtg88/journalism
filagora/filagora-ai-forums