src/Venturecraft/Revisionable/RevisionableTrait.php
/**
     * Create the event listeners for the saving and saved events
     * This lets us save revisions whenever a save is made, no matter the
     * http method.
     *
     */
Create the event listeners for the saving and saved events
This lets us save revisions whenever a save is made, no matter the
http method.
Create the event listeners for the saving and saved events This lets us save revisions whenever a save is made no matter the http method .
public static function bootRevisionableTrait()
    {
        static::saving(function ($model) {
            $model->preSave();
        });
        static::saved(function ($model) {
            $model->postSave();
        });
        static::created(function ($model) {
            $model->postCreate();
        });
        static::deleted(function ($model) {
            $model->preSave();
            $model->postDelete();
            $model->postForceDelete();
        });
    }
public static function bootRevisionableTrait ( ) { static :: saving ( function ( $ model ) { $ model -> preSave ( ) ; } ) ; static :: saved ( function ( $ model ) { $ model -> postSave ( ) ; } ) ; static :: created ( function ( $ model ) { $ model -> postCreate ( ) ; } ) ; static :: deleted ( function ( $ model ) { $ model -> preSave ( ) ; $ model -> postDelete ( ) ; $ model -> postForceDelete ( ) ; } ) ; }
Create the event listeners for the saving and saved events
 This lets us save revisions whenever a save is made, no matter the
 http method.
Create the event listeners for the saving and saved events This lets us save revisions whenever a save is made no matter the http method .