*/ public $collects = TicketResource::class; private readonly int $scannedTickets; private readonly int $totalTickets; public function __construct(AdminAppTicketResult $result) { parent::__construct($result->tickets); $this->scannedTickets = $result->scannedTickets; $this->totalTickets = $result->totalTickets; } /** @return array{scanned_tickets: int, total_tickets: int} */ public function with(Request $request): array { return [ 'scanned_tickets' => $this->scannedTickets, 'total_tickets' => $this->totalTickets, ]; } }