PHPackages                             jangaraev/eloquent-model-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. jangaraev/eloquent-model-advisory-lock

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

jangaraev/eloquent-model-advisory-lock
======================================

Handy approach to avoid race conditions when doing upserts in Laravel Eloquent models

0.91(1y ago)0704↓41.7%[1 issues](https://github.com/jangaraev/eloquent-model-advisory-lock/issues)MITPHPPHP &gt;=7.4

Since May 23Pushed 1y ago1 watchersCompare

[ Source](https://github.com/jangaraev/eloquent-model-advisory-lock)[ Packagist](https://packagist.org/packages/jangaraev/eloquent-model-advisory-lock)[ Docs](https://github.com/jangaraev/eloquent-model-advisory-lock)[ RSS](/packages/jangaraev-eloquent-model-advisory-lock/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)Dependencies (1)Versions (3)Used By (0)

eloquent-model-advisory-lock
============================

[](#eloquent-model-advisory-lock)

Often you face the race conditions error when working with DB-intensive operations.

This package contains a trait with the method which helps to avoid that.

Usage
-----

[](#usage)

First do reference the trait in your model:

```
