You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: readme.md
+13Lines changed: 13 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -110,6 +110,19 @@ class Article extends Eloquent {
110
110
}
111
111
```
112
112
113
+
You can also disable revisioning after X many revisions have been made by setting `$historyLimit` to the number of revisions you want to keep before stopping revisions.
114
+
115
+
```php
116
+
namespace MyApp\Models;
117
+
118
+
class Article extends Eloquent {
119
+
use Venturecraft\Revisionable\RevisionableTrait;
120
+
121
+
protected $revisionEnabled = true;
122
+
protected $historyLimit = 500; //Stop tracking revisions after 500 changes have been made.
123
+
}
124
+
```
125
+
113
126
### Storing soft deletes
114
127
115
128
By default, if your model supports soft deletes, revisionable will store this and any restores as updates on the model.
0 commit comments