Delete expires ots & add duration to create
CI/CD / test_and_check_app (push) Failing after 53s
CI/CD / Publish immutable image (push) Skipped

This commit is contained in:
2026-10-13 09:56:53 +02:00
parent 8fadceabed
commit ec93510f4b
7 changed files with 106 additions and 24 deletions
@@ -0,0 +1,19 @@
<?php
namespace App\Console\Commands;
use App\Models\OneTimeSecret;
use Illuminate\Console\Attributes\Signature;
use Illuminate\Console\Command;
#[Signature('app:delete-expired-one-time-secrets')]
class DeleteExpiredOneTimeSecrets extends Command
{
/**
* Execute the console command.
*/
public function handle(): void
{
OneTimeSecret::whereDate('expires_at', '<', now())->delete();
}
}