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

[2.x] Get model of PersonalAccessToken before deleting it #771

Merged

Conversation

dominikkukacka
Copy link
Contributor

Jetstream/Sanctum supports overwriting the PersonalAccessTokenModel via Sanctum::$personalAccessTokenModel

In the current state Jetstream will delete tokens via the query builder without fetching the token first, which will not trigger the deleting/deleted events.

There are some use-cases where you might want to "mirror" the changes to tokens to an API gateway.

@driesvints driesvints changed the title Get model of PersonalAccessToken before deleting it to make sure the deleting/deleted events are triggered [2.x] Get model of PersonalAccessToken before deleting it to make sure the deleting/deleted events are triggered Apr 23, 2021
@taylorotwell taylorotwell merged commit 37a0e52 into laravel:2.x Apr 23, 2021
@driesvints driesvints changed the title [2.x] Get model of PersonalAccessToken before deleting it to make sure the deleting/deleted events are triggered [2.x] Get model of PersonalAccessToken before deleting it Apr 27, 2021
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