2017 © Pedro Peláez
 

library laravel-restorable-events

This library is an help to store and restore events for laravel.

image

grummfy/laravel-restorable-events

This library is an help to store and restore events for laravel.

  • Tuesday, January 30, 2018
  • by Grummfy
  • Repository
  • 1 Watchers
  • 0 Stars
  • 8 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

Laravel restorable events

This library is an help to store and restore events., (*1)

Compatible with laravel 5.5., (*2)

Install

Install the dependencies, (*3)

composer require grummfy/laravel-restorable-events

Publish the configuration, (*4)

php artisan vendor:publish --tag=config --provider=Grummfy\RestorableEvents\RestorableEventsProvider

Create the model class, using the trait EventStorableTrait. See the example directory if you need it., (*5)

Edit your Providers\EventServiceProvider.php: * Use the trait EventServiceProviderTrait * You will also require to have this variable set, with at least theses values:, (*6)

    protected $listen = [
        JsonSerializableContract::class => [
            StorableEventListener::class,
        ],
    ];

This will allow the usage of the storage of the event on the fly., (*7)

Usage

On any event you want to store, just extends RestorableEvent or implements the two interface RestorableContract, JsonSerializableContract. The rest is made by the listener., (*8)

If you need to hook some change, when an event is restored, just implements the restored method available on it., (*9)

If you require you could also prioritise the events. Just fill the $priorities value from the trait on the service listener., (*10)

What's stored

In the event CreditRefilled is dispatched, it will be saved, but for each eloquent model, only the id and the name of the model will be saved., (*11)

TODO

  • unit test
  • QA tools
    • travis
    • styleci
    • scrutinizer
    • ...

The Versions

30/01 2018

dev-master

9999999-dev

This library is an help to store and restore events for laravel.

  Sources   Download

MIT

The Requires

 

by Avatar Grummfy

laravel model event restorable

30/01 2018

0.5.2

0.5.2.0

This library is an help to store and restore events for laravel.

  Sources   Download

MIT

The Requires

 

by Avatar Grummfy

laravel model event restorable

23/01 2018

0.5.1

0.5.1.0

This library is an help to store and restore events for laravel.

  Sources   Download

MIT

The Requires

 

by Avatar Grummfy

laravel model event restorable

22/01 2018

0.5.0

0.5.0.0

This library is an help to store and restore events for laravel.

  Sources   Download

MIT

The Requires

 

by Avatar Grummfy

laravel model event restorable