add notifications logic and add support of both JWT and Sanctum
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
namespace App\Services\Auth;
|
||||
|
||||
use App\Models\PasswordResetRequest;
|
||||
|
||||
class PasswordResetCleanupService
|
||||
{
|
||||
public function cleanup(int $days = 30): int
|
||||
{
|
||||
$threshold = now()->subDays($days)->toDateTimeString();
|
||||
|
||||
return PasswordResetRequest::query()
|
||||
->where('requested_at', '<', $threshold)
|
||||
->delete();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user