Visitor management app with SSO, kiosk, badges, reports, and Gitea CI deploy to frontdesk.ladill.com. Co-authored-by: Cursor <cursoragent@cursor.com>
23 lines
603 B
PHP
23 lines
603 B
PHP
<?php
|
|
|
|
namespace App\Console\Commands;
|
|
|
|
use App\Services\Frontdesk\DeviceService;
|
|
use Illuminate\Console\Command;
|
|
|
|
class MarkDevicesOfflineCommand extends Command
|
|
{
|
|
protected $signature = 'frontdesk:mark-devices-offline {--minutes=10 : Minutes since last heartbeat}';
|
|
|
|
protected $description = 'Mark devices without recent heartbeat as offline';
|
|
|
|
public function handle(DeviceService $devices): int
|
|
{
|
|
$count = $devices->markStaleDevicesOffline((int) $this->option('minutes'));
|
|
|
|
$this->info("Marked {$count} device(s) as offline.");
|
|
|
|
return self::SUCCESS;
|
|
}
|
|
}
|