From 55e91a323c6e764149f385fd38e16ce735b3df6b Mon Sep 17 00:00:00 2001 From: Daniel-I-Am Date: Thu, 2 Sep 2021 13:07:48 +0200 Subject: [PATCH] Add a CLI command to remove expired tokens --- .../ClearExpiredAuthenticationCommand.php | 48 +++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 app/Console/Commands/ClearExpiredAuthenticationCommand.php diff --git a/app/Console/Commands/ClearExpiredAuthenticationCommand.php b/app/Console/Commands/ClearExpiredAuthenticationCommand.php new file mode 100644 index 0000000..bb6d475 --- /dev/null +++ b/app/Console/Commands/ClearExpiredAuthenticationCommand.php @@ -0,0 +1,48 @@ +whereDate('valid_until', '<', Carbon::now()) + ->delete(); + + return 0; + } +}