Files
ots/app/Console/Commands/DeleteExpiredOneTimeSecrets.php
T
Twyco ec93510f4b
CI/CD / test_and_check_app (push) Failing after 53s
CI/CD / Publish immutable image (push) Skipped
Delete expires ots & add duration to create
2026-10-13 09:56:53 +02:00

20 lines
423 B
PHP

<?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();
}
}