PHPackages                             mpyw/laravel-database-advisory-lock - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. mpyw/laravel-database-advisory-lock

ActiveLibrary[Database &amp; ORM](/categories/database)

mpyw/laravel-database-advisory-lock
===================================

Advisory Locking Features of Postgres/MySQL/MariaDB on Laravel

v4.4.1(1y ago)2860.5k↓33.3%4[1 issues](https://github.com/mpyw/laravel-database-advisory-lock/issues)MITPHPPHP ^8.2CI passing

Since Jul 12Pushed 5mo ago1 watchersCompare

[ Source](https://github.com/mpyw/laravel-database-advisory-lock)[ Packagist](https://packagist.org/packages/mpyw/laravel-database-advisory-lock)[ RSS](/packages/mpyw-laravel-database-advisory-lock/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (9)Dependencies (11)Versions (18)Used By (0)

Laravel Database Advisory Lock [![Build Status](https://github.com/mpyw/laravel-database-advisory-lock/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/mpyw/laravel-database-advisory-lock/actions) [![Coverage Status](https://camo.githubusercontent.com/902c5b8f860601715658d8efceb4e075bf29c66cceff18011fa7baf69816e6f7/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f6d7079772f6c61726176656c2d64617461626173652d61647669736f72792d6c6f636b2f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/mpyw/laravel-database-advisory-lock?branch=master)
=============================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================

[](#laravel-database-advisory-lock--)

Advisory Locking Features of Postgres/MySQL/MariaDB on Laravel

Requirements
------------

[](#requirements)

PackageVersionMandatoryPHP`^8.2`✅Laravel`^11.0 || ^12.0`✅PHPStan`>=2.0`Note

Older versions have outdated dependency requirements. If you cannot prepare the latest environment, please refer to past releases.

RDBMSVersionPostgres`>=9.1.14`MySQL`>=5.7.5`MariaDB`>=10.0.15`Installing
----------

[](#installing)

```
composer require mpyw/laravel-database-advisory-lock:^4.4

```

Basic usage
-----------

[](#basic-usage)

Important

The default implementation is provided by `ConnectionServiceProvider`, however, **package discovery is not available**. Be careful that you MUST register it in **`config/app.php`** by yourself.

```
