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.
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
๐ 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.
๐ Application-level distributed locking
๐ค Automatic owner detection
โก Expressive fluent API (Lock::for(...))
๐๏ธ Multiple storage backends
๐งฉ Native Eloquent integration (HasLocks)
๐ฃ๏ธ Route middleware
๐ฆ Immutable LockInfo DTOs
๐งน Automatic database pruning
๐ Custom storage driver extensibility
๐ข Lock lifecycle events
Lock::for('billing_charge', $user)
->block(function () {
// Critical section...
});
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
How can I help you explore Laravel packages today?