Skip to content

Commit

Permalink
fire both types of events
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorotwell committed Nov 2, 2016
1 parent bb15574 commit 9770d1a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Illuminate/Database/Eloquent/Model.php
Original file line number Diff line number Diff line change
Expand Up @@ -1708,9 +1708,13 @@ protected function fireModelEvent($event, $halt = true)
// instead of the string version of the event. This provides for a custom
// "object-based" event more consistent with the rest of the framework.
if (isset($this->events[$event])) {
return static::$dispatcher->$method(
$result = static::$dispatcher->$method(
new $this->events[$event]($this)
);

if (! is_null($result)) {
return $result;
}
}

// We will append the names of the class to the event to distinguish it from
Expand Down

0 comments on commit 9770d1a

Please sign in to comment.