Skip to content
This repository was archived by the owner on Jul 16, 2023. It is now read-only.

Commit 4f7e36e

Browse files
committed
Updated purge additional fields example
1 parent 8ac1128 commit 4f7e36e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -350,8 +350,8 @@ class User extends \LaravelBook\Ardent\Ardent {
350350
You can also purge additional fields. The attribute `Ardent::$purgeFilters` is an array of closures to which you can add your custom rules. Those closures receive the attribute key as argument and should return `false` for attributes that should be purged. Like this:
351351

352352
```php
353-
function __construct() {
354-
parent::__construct();
353+
function __construct($attributes = array()) {
354+
parent::__construct($attributes);
355355

356356
$this->purgeFilters[] = function($key) {
357357
$purge = array('tempData', 'myAttribute');

0 commit comments

Comments
 (0)