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
If you have never used the Composer dependency manager before, head to the [Composer website](https://getcomposer.org/) for more information on how to get started.
@@ -59,6 +59,8 @@ class SensitiveModel extends RedactedModel
59
59
60
60
If you want to completely omit the field instead of redacting it you can set the `redact` variable on your model to false.
61
61
62
+
_Note: If `redactKeys` is set to true, when the model is serialised the keys of redacted fields will also be omitted._
63
+
62
64
```php
63
65
class SensitiveModel extends RedactedModel
64
66
{
@@ -99,4 +101,24 @@ class SensitiveModel extends RedactedModel
99
101
...
100
102
101
103
$instanceOfRedactedModel->name // Returns K***y instead of Kathryn Janeway
102
-
```
104
+
```
105
+
106
+
### Enabling and disabling protection
107
+
108
+
If you want to temporarily disable field redaction or omission you can call `disableProtection()` on the model to disable protection and `enableProtection()` to re-enable it. This has to be used on a per-instance basis.
0 commit comments