18 lines
591 B
PHP
Executable file
18 lines
591 B
PHP
Executable file
<?php
|
|
|
|
use App\Services\MagicLinkAuthService;
|
|
use Illuminate\Foundation\Inspiring;
|
|
use Illuminate\Support\Facades\Artisan;
|
|
use Illuminate\Support\Facades\Log;
|
|
use Illuminate\Support\Facades\Schedule;
|
|
|
|
Artisan::command('inspire', function () {
|
|
$this->comment(Inspiring::quote());
|
|
})->purpose('Display an inspiring quote');
|
|
|
|
// Scheduled task to clean up expired magic login tokens
|
|
Schedule::call(function () {
|
|
$service = app(MagicLinkAuthService::class);
|
|
$deleted = $service->cleanupExpiredTokens();
|
|
Log::info("Cleaned up {$deleted} expired magic login tokens");
|
|
})->daily();
|