diff --git a/Makefile b/Makefile index b581a6a..5d9740d 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,7 @@ +.PHONY: phpunit +phpunit: + docker-compose run composer run phpunit + .PHONY: tests tests: docker-compose run composer run test diff --git a/src/Builders/EventMessageBuilder.php b/src/Builders/EventMessageBuilder.php index 8b1fb73..7ade355 100644 --- a/src/Builders/EventMessageBuilder.php +++ b/src/Builders/EventMessageBuilder.php @@ -20,7 +20,7 @@ public function build(Model $model, string $eventType): EventMessageInterface eventType: $eventType, modelName: $modelName, eventName: $modelName . ucfirst($eventType), - payload: $model->toArray(), + payload: $model->attributesToArray(), createdAt: Carbon::now()->toDateTimeString(), ); }