diff --git a/app/Repositories/BaseRepository.php b/app/Repositories/BaseRepository.php index 1de29f8998dd..1baeb4ebf3bb 100644 --- a/app/Repositories/BaseRepository.php +++ b/app/Repositories/BaseRepository.php @@ -337,7 +337,7 @@ class BaseRepository public function newEntityEvent($model) { - $className = $this->getEventClass($entity, 'Created'); + $className = $this->getEventClass($model, 'Created'); if (class_exists($className)) { event(new $className($model, $model->company));