2017 © Pedro Peláez
 

library versioning

Prevents update conflicts using the optimistic lock pattern in Laravel

image

laravel-enso/versioning

Prevents update conflicts using the optimistic lock pattern in Laravel

  • Friday, July 27, 2018
  • by aocneanu
  • Repository
  • 3 Watchers
  • 24 Stars
  • 1,717 Installations
  • PHP
  • 2 Dependents
  • 0 Suggesters
  • 3 Forks
  • 0 Open issues
  • 8 Versions
  • 5103 % Grown

The README.md

Versioning

Codacy Badge StyleCI License Total Downloads Latest Stable Version, (*1)

Prevents update conflicts using the optimistic lock pattern in Laravel, (*2)

This package can work independently of the Enso ecosystem., (*3)

For live examples and demos, you may visit laravel-enso.com, (*4)

Installation

  1. install the package composer require laravel-enso/versioning
  2. run the migrations
  3. use the Versionable trait on the models you want versioning on.

By default, the version value is kept in a 'version' attribute, but this can be customized (see below)., (*5)

Features

  • the package creates a versionings table where it holds versions for all the versionable models
  • by using the Versionable trait on a model, versioning is handled automatically
  • by default the trait appends a version attribute after the model is retrieved, used for tracking versions and expects the same attribute to be present on the model when the update is called
  • the default versioning attribute can be customized by using protected $versioningAttribute = 'customVersionAttribte' on the model
  • the trait can be used on models that already have records in the database, the versioning starts with the first retrieval of those models
  • when a versionable model is deleted, its versioning is deleted also. If the model uses SoftDeletes, the versioning is not deleted, unless doing a forceDelete
  • throws a ConflictHttpException if the version does not match on update
  • tests are included with the package

Configuration & Usage

Be sure to check out the full documentation for this package available at docs.laravel-enso.com, (*6)

Contributions

are welcome. Pull requests are great, but issues are good too., (*7)

License

This package is released under the MIT license., (*8)

The Versions

27/07 2018

dev-master

9999999-dev https://github.com/laravel-enso/Versioning

Prevents update conflicts using the optimistic lock pattern in Laravel

  Sources   Download

MIT

The Requires

 

trait versioning optimistic-lock laravel-enso

04/06 2018

1.1.2

1.1.2.0 https://github.com/laravel-enso/Versioning

Prevents update conflicts using the optimistic lock pattern in Laravel

  Sources   Download

MIT

The Requires

 

trait versioning optimistic-lock laravel-enso

03/06 2018

1.1.1

1.1.1.0 https://github.com/laravel-enso/Versioning

Prevents update conflicts using the optimistic lock pattern in Laravel

  Sources   Download

MIT

The Requires

 

trait versioning optimistic-lock laravel-enso

03/06 2018

1.1.0

1.1.0.0 https://github.com/laravel-enso/Versioning

Prevents update conflicts using the optimistic lock pattern in Laravel

  Sources   Download

MIT

The Requires

 

trait versioning optimistic-lock laravel-enso

28/05 2018

1.0.3

1.0.3.0 https://github.com/laravel-enso/Versioning

Prevents update conflicts using the optimistic lock pattern in Laravel

  Sources   Download

MIT

The Requires

 

trait versioning optimistic-lock laravel-enso

26/05 2018

1.0.2

1.0.2.0 https://github.com/laravel-enso/Versioning

Prevents update conflicts using the optimistic lock pattern in Laravel

  Sources   Download

MIT

The Requires

 

trait versioning optimistic-lock laravel-enso

26/05 2018

1.0.1

1.0.1.0 https://github.com/laravel-enso/Versioning

Prevents update conflicts using the optimistic lock pattern in Laravel

  Sources   Download

MIT

The Requires

 

trait versioning optimistic-lock laravel-enso

25/05 2018

1.0.0

1.0.0.0 https://github.com/laravel-enso/Versioning

Prevents update conflicts using the optimistic lock pattern in Laravel

  Sources   Download

MIT

The Requires

 

trait versioning optimistic-lock laravel-enso