Skip to content


Laravel passport prune / revoke token event listeners

Laravel, Passport1 min read

I found serveral examples, but I used two examples and sort up it, here is solution:

Firstly, you need to add two classes to EventServiceProvider:

Next, execute php artisan event:generate artisan command, it should be generating two event classes: 1. PruneOldTokens 2. RevokeOldTokens