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
> The `$keepRevisionOf` setting takes precendence over `$dontKeepRevisionOf`
187
187
188
+
## Custom Fields
189
+
190
+
For adding custom fields add $revisionsCustomFields in you model. After that add a function in your model to add the custom fields and their value while creating/updating/deleting:
191
+
192
+
```php
193
+
protected $revisionsCustomFields;
194
+
```
195
+
196
+
```php
197
+
public function addRevisionsCustomFields($custom_fields) {
198
+
$this->revisionsCustomFields = $custom_fields;
199
+
}
200
+
```
201
+
202
+
Now in your controller file, add fields like this
203
+
(Example for User)
204
+
```php
205
+
$user->addRevisionsCustomFields([
206
+
'action' => "Create"
207
+
]);
208
+
$user->save();
209
+
```
210
+
211
+
188
212
### Events
189
213
190
214
Every time a model revision is created an event is fired. You can listen for `revisionable.created`,
0 commit comments