From 0a0238b8040abc1c71401ce27a8edf2619fa5bed Mon Sep 17 00:00:00 2001 From: Igor Santos Date: Tue, 25 Feb 2014 17:39:04 -0300 Subject: [PATCH] Updating getObservableEvents to better overwrite the original method --- src/LaravelBook/Ardent/Ardent.php | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) mode change 100644 => 100755 src/LaravelBook/Ardent/Ardent.php diff --git a/src/LaravelBook/Ardent/Ardent.php b/src/LaravelBook/Ardent/Ardent.php old mode 100644 new mode 100755 index 1377620..49386fd --- a/src/LaravelBook/Ardent/Ardent.php +++ b/src/LaravelBook/Ardent/Ardent.php @@ -232,6 +232,13 @@ public static function boot() { } } + public function getObservableEvents() { + return array_merge( + parent::getObservableEvents(), + array('validating', 'validated') + ); + } + /** * Register a validating model event with the dispatcher. * @@ -882,15 +889,4 @@ public function newQuery($excludeDeleted = true) { return $builder; } - - public function getObservableEvents(){ - return array_merge( - array( - 'creating', 'created', 'updating', 'updated', - 'deleting', 'deleted', 'saving', 'saved', - 'restoring', 'restored', 'validating', 'validated' - ), - $this->observables - ); - } }