From 4f7e36ebc15c74b6cd3377eeaacf5bc46ef42746 Mon Sep 17 00:00:00 2001 From: pweston Date: Sat, 28 Dec 2013 12:51:14 +1300 Subject: [PATCH] Updated purge additional fields example --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a7b801a..60c5fa5 100644 --- a/README.md +++ b/README.md @@ -350,8 +350,8 @@ class User extends \LaravelBook\Ardent\Ardent { 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: ```php -function __construct() { - parent::__construct(); +function __construct($attributes = array()) { + parent::__construct($attributes); $this->purgeFilters[] = function($key) { $purge = array('tempData', 'myAttribute');