I'm Using Laravel passport for API implementation, When user logged into the site it creates a new token, the old ones are revoked, due to this records are getting increased day by day..
Is there anyway to delete passport expired tokens ?
Thanks in advance.
We'll be using this command to purge revoked and expired tokens:
<?php
namespace App\Console;
class Kernel extends ConsoleKernel
{
protected function schedule(Schedule $schedule)
{
$schedule->command('passport:purge')->dailyAt('03:00');
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With