Skip to content

Commit

Permalink
Removed model relations from events payload
Browse files Browse the repository at this point in the history
  • Loading branch information
xaviapa authored Oct 24, 2023
2 parents cc384ca + f54a0f4 commit 0030888
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
.PHONY: phpunit
phpunit:
docker-compose run composer run phpunit

.PHONY: tests
tests:
docker-compose run composer run test
Expand Down
2 changes: 1 addition & 1 deletion src/Builders/EventMessageBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
);
}
Expand Down

0 comments on commit 0030888

Please sign in to comment.