Files
Verde-Web/config/qr.php
admin d458e74301 feat(backend): complete Module 7 — QR code system (core)
qr_code_batches + qr_codes tables. State machine via
spatie/laravel-model-states (unassigned → allocated → active → used,
plus expired/voided). Serial format PH-{area}-{YYMM}-{batch}-{code}-
{checksum} with 2-char SHA-256-derived checksum. BatchGenerator
bulk-inserts in chunks. QrAllocator allocates free codes to verified
households (prefers area-targeted batch, falls back to any). Real
HouseholdVerified listener replaces the placeholder. QrBalanceLow
event for Module 11.

Admin: batch CRUD, mark-printed, void code, lifecycle search, PDF
print sheet (24/A4 via dompdf + endroid/qr-code + picqer/barcode).
Resident: list own codes, balance with low_balance flag, activate
allocated codes.

Removed explicit Event::listen for HouseholdVerified — Laravel 11
auto-discovers it via handle() type-hint, and double-registering was
causing double-dispatch.

130 feature tests passing.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-30 02:12:41 +08:00

21 lines
608 B
PHP

<?php
return [
/*
| How many free QR codes a verified household receives.
*/
'free_allocation_per_household' => (int) env('QR_FREE_ALLOCATION_PER_HOUSEHOLD', 10),
/*
| When a household's active code count drops to or below this number,
| a QrBalanceLow event fires (notification listeners hook off it).
*/
'low_balance_threshold' => (int) env('QR_LOW_BALANCE_THRESHOLD', 5),
/*
| Default expiry for a generated batch (months from creation). Null
| means no expiry.
*/
'default_batch_expiry_months' => env('QR_DEFAULT_BATCH_EXPIRY_MONTHS', null),
];