2017 © Pedro Peláez
 

library laravel-record-lock

A locking library

image

tokenly/laravel-record-lock

A locking library

  • Thursday, November 30, 2017
  • by dweller
  • Repository
  • 3 Watchers
  • 2 Stars
  • 8,631 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 17 % Grown

The README.md

Record Lock

A Laravel library for creating a shared lock across an application. Requires a MySQL database connection., (*1)

Installation

Add the Laravel package via composer

composer require tokenly/laravel-record-lock

Add the Service Provider (Laravel <= 5.4 only)

Add the following to the providers array in your application config:, (*2)

Tokenly\RecordLock\Provider\RecordLockServiceProvider::class

Use it


use Tokenly\RecordLock\Facade\RecordLock; $lock_id = 'plant-garden-once'; $planted = RecordLock::acquireAndExecute($lock_id, function() { // plant the garden // only one process should do this at a time // other processes will block until this is complete sleep(1); return true; });

The Versions

30/11 2017

dev-master

9999999-dev

A locking library

  Sources   Download

MIT

The Requires

  • php >=5.5.0

 

The Development Requires

30/11 2017

v1.1.0

1.1.0.0

A locking library

  Sources   Download

MIT

The Requires

  • php >=5.5.0

 

The Development Requires

07/07 2017

v1.0.0

1.0.0.0

A locking library

  Sources   Download

MIT

The Requires

  • php >=5.5.0

 

The Development Requires