Looking to hire Laravel developers? Try LaraJobs

laravel-optimistic maintained by really4you

Description
Laravel Concurrent updating for model.
Last update
2021/09/03 04:27 (dev-master)
Links
Downloads
3

Comments
comments powered by Disqus

Installing

$ composer require really4you/laravel-optimistic

Usage

Add Really4you\LaravelOptimistic\Optimistic trait to the model and set Optimistic attributes:

use Really4you\laravelOptimistic\Optimistic;

class GoodsPatent extends Model
{
    use Optimistic;
    
    /**
     * the name of the "optimistic" column.
     *
     * @var string
     */
    protected $versionAt = 'updating_column';
    
    <...>
}