Download the PHP package laravel-liberu/versioning without Composer
On this page you can find all versions of the php package laravel-liberu/versioning. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download laravel-liberu/versioning
More information about laravel-liberu/versioning
Files in laravel-liberu/versioning
Download laravel-liberu/versioning
More information about laravel-liberu/versioning
Files in laravel-liberu/versioning
Vendor laravel-liberu
Package versioning
Short Description Prevents update conflicts using the optimistic lock pattern in Laravel
License MIT
Package versioning
Short Description Prevents update conflicts using the optimistic lock pattern in Laravel
License MIT
Please rate this library. Is it a good library?
Informations about the package versioning
Versioning
Prevents update conflicts using the optimistic lock pattern in Laravel
This package can work independently of the Liberu ecosystem.
For live examples and demos, you may visit liberu.co.uk
Installation
- install the package
composer require laravel-liberu/versioning
- run the migrations
- 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).
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 aforceDelete
- 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.liberu.co.uk
Contributions
are welcome. Pull requests are great, but issues are good too.
License
This package is released under the MIT license.
All versions of versioning with dependencies
PHP Build Version
Package Version
The package laravel-liberu/versioning contains the following files
Loading the files please wait ....