New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

anourvalar/laravel-atom

ACID API
12,945 1
Install
composer require anourvalar/laravel-atom
Latest Version:2.24.22
PHP:^8.0
Laravel:8 – 13
Older releases:5 · 6 · 7
License:MIT
Last Updated:Aug 25, 2026
Links: GitHub  ·  Packagist
Maintainer: AnourValar

Laravel ACID API

Installation

composer require anourvalar/laravel-atom

Usage

Action after transaction commit

Atom::onCommit(function () {
    dispatch(new Job());
});

Action after transaction rollBack

Atom::onRollBack(function () {
    Storage::delete('file.jpg');
});

Pessimistic lock

Atom::lock('user');
Atom::lockUser($user->id); // equals to: Atom::lock('user', $user->id);

Optimistic lock

try {
    Atom::strategy('optimistic_transaction')->lock('week_report');
} catch (\AnourValar\LaravelAtom\Exceptions\OptimisticTransactionException $e) {
    // already in progress..
}

Related Packages

anourvalar/config-helper

Helper functions over Laravel config

11,824 0
technote/laravel-transaction-fire-event

Controlling events that occur in a transaction

11,584 1
gilak/nolock

get read of locking file in both laravel and the way laravel use league filesyst...

2,236 2
latrell/lock

支持Redis与Memcached的并发锁。

22,934 32
wooxo/command-lock-redis

'Lock system' for your command task (Laravel 4.2)

1,479 0

Version History

Version Released PHP Laravel License
2.24.22 ^8.0 ^8.0|^9.0|^10.0|^11.0|^12.0|^13.0 MIT
2.24.21 ^8.0 ^8.0|^9.0|^10.0|^11.0|^12.0|^13.0 MIT
2.24.20 ^8.0 ^8.0|^9.0|^10.0|^11.0|^12.0|^13.0 MIT
2.24.19 ^8.0 ^8.0|^9.0|^10.0|^11.0|^12.0|^13.0 MIT
2.24.18 ^8.0 ^8.0|^9.0|^10.0|^11.0|^12.0|^13.0 MIT