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

Commit 0a0238b

Browse files
committed
Updating getObservableEvents to better overwrite the original method
1 parent 2d26521 commit 0a0238b

File tree

1 file changed

+7
-11
lines changed

1 file changed

+7
-11
lines changed

src/LaravelBook/Ardent/Ardent.php

100644100755
+7-11
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,13 @@ public static function boot() {
232232
}
233233
}
234234

235+
public function getObservableEvents() {
236+
return array_merge(
237+
parent::getObservableEvents(),
238+
array('validating', 'validated')
239+
);
240+
}
241+
235242
/**
236243
* Register a validating model event with the dispatcher.
237244
*
@@ -882,15 +889,4 @@ public function newQuery($excludeDeleted = true) {
882889

883890
return $builder;
884891
}
885-
886-
public function getObservableEvents(){
887-
return array_merge(
888-
array(
889-
'creating', 'created', 'updating', 'updated',
890-
'deleting', 'deleted', 'saving', 'saved',
891-
'restoring', 'restored', 'validating', 'validated'
892-
),
893-
$this->observables
894-
);
895-
}
896892
}

0 commit comments

Comments
 (0)