anourvalar/laravel-atom

ACID API
12,737 1
Install
composer require anourvalar/laravel-atom
Latest Version:2.24.22
PHP:^8.0
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

latrell/lock

支持Redis与Memcached的并发锁。

22,909 32
foothing/laravel-lock-routes

Add route-based checks for Laravel Lock permissions.

174 3
ytake/laravel-aspect

Aspect Oriented Programming library for laravel framework, and lumen

143,346 138
rap2hpoutre/nestor

Do task, rollback if something goes wrong. Just like database transactions.

10,239 4
ivolkoff/nolock

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

426 0