<?php

namespace App\Http\Controllers;

use App\Models\EventParticipant;
use App\Providers\GiroCodeProvider;
use App\Providers\QrCodeUrlProvider;
use Illuminate\Http\Request;

class EventCodeGetController {
    public function __invoke(string $eventToken, Request $request)
    {
        $qrCodeProvider = new QrCodeUrlProvider($eventToken);

        return response($qrCodeProvider->createQrCode($request),    200,
            ['Content-Type' => 'image/png']
        );
    }
}
