Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds last event helper #327

Merged
merged 3 commits into from
Mar 4, 2022
Merged

Adds last event helper #327

merged 3 commits into from
Mar 4, 2022

Conversation

aidan-casey
Copy link
Contributor

It is a common practice, particularly when using event queries, to retrieve the last event from the database. This pull request adds the helper lastEvent to the EloquentStoredEventQueryBuilder which will retrieve the last recorded event. For added developer experience, it accepts specific event classes for parameters and passes these to the whereEvent method.

@brendt
Copy link
Collaborator

brendt commented Mar 4, 2022

Awesome! Can you fix the conflicts?

@aidan-casey
Copy link
Contributor Author

@brendt - Good to go. 👍🏼

@brendt brendt merged commit 67fe60f into spatie:main Mar 4, 2022
@brendt
Copy link
Collaborator

brendt commented Mar 4, 2022

Tagged: https://github.com/spatie/laravel-event-sourcing/releases/tag/7.2.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants