325

Product support

Visit this product's website for support.

Categories

Revisions

Revisions allows extending any model with the Revisionable trait. It offers more features and are easy to use.

Extends OctoberCMS core trait Revisionable: https://octobercms.com/docs/database/traits#revisionable

Usage

Extending model with Revisions trait.

class MyModel {
    use \Samuell\Revisions\Traits\Revisions;

    /**
     * @var array Monitor these attributes for changes.
     */
    protected $revisionable = ['name', 'email'];

}

Adding a new widget to our form config (fields.yaml)

history:
    label: History of changes
    span: full
    disabled: true
    type: revisionhistory

Usage

Extending model with Revisions trait.

class MyModel {
    use \Samuell\Revisions\Traits\Revisions;

    /**
     * @var array Monitor these attributes for changes.
     */
    protected $revisionable = ['name', 'email'];

}

Adding a new widget to our form config (fields.yaml)

history:
    label: History of changes
    span: full
    disabled: true
    type: revisionhistory
1.2.0

Add pagination

Nov 14, 2020

1.0.1

First version of Revisions

Apr 16, 2020