Basic signup for events

This commit is contained in:
2026-03-21 21:02:15 +01:00
parent 23af267896
commit b8341890d3
74 changed files with 4046 additions and 947 deletions

View File

@@ -0,0 +1,31 @@
<?php
namespace App\Http\Controllers;
use App\Models\EventParticipant;
use App\Providers\GiroCodeProvider;
use Illuminate\Http\Request;
class GiroCodeGetController {
public function __invoke(string $participantToken, Request $request)
{
$participant = EventParticipant::where(['identifier' => $participantToken])->first();
if (null === $participant) {
return response()->json(['message' => 'Participant not found'], 404);
}
$amount = $participant->amount;
$amount->subtractAmount($participant->amount_paid);
$girocodeProvider = new GiroCodeProvider(
$participant->event()->first()->account_owner,
$participant->event()->first()->account_iban,
$participant->amount->getAmount(),
$participant->payment_purpose
);
return response($girocodeProvider->create(), 200,
['Content-Type' => 'image/png']
);
}
}