Skip to content

Commit

Permalink
fix bug with has events
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorotwell committed Feb 27, 2017
1 parent 063e5ae commit c5a6290
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Illuminate/Database/Eloquent/Concerns/HasEvents.php
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,11 @@ protected function fireModelEvent($event, $halt = true)

$result = $this->fireCustomModelEvent($event, $method);

return ! is_null($result) ? $result : static::$dispatcher->{$method}(
if ($result === false) {
return false;
}

return ! empty($result) ? $result : static::$dispatcher->{$method}(
"eloquent.{$event}: ".static::class, $this
);
}
Expand Down

0 comments on commit c5a6290

Please sign in to comment.