Files
ladill-frontdesk/app/Console/Commands/MarkDevicesOfflineCommand.php
isaaccladandCursor 9e2d79936c
Deploy Ladill Frontdesk / deploy (push) Failing after 35s
Test / test (push) Failing after 2m45s
Initial Ladill Frontdesk release with deploy pipeline.
Visitor management app with SSO, kiosk, badges, reports, and Gitea CI deploy to frontdesk.ladill.com.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-27 20:37:15 +00:00

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;
}
}