Complete Events–Meet integration phases 2–5.
Deploy Ladill Events / deploy (push) Successful in 41s

Programme sync to Meet rooms, wallet-billed mass comms, webhook lifecycle updates, and registration access bridge with join-window gating on public pages.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
isaacclad
2026-07-01 22:31:45 +00:00
co-authored by Cursor
parent 06fedcfc55
commit 05a6be7efe
20 changed files with 798 additions and 115 deletions
@@ -0,0 +1,39 @@
<?php
namespace App\Http\Controllers\Api;
use App\Http\Controllers\Controller;
use App\Services\Meet\MeetLifecycleService;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
class MeetWebhookController extends Controller
{
public function __invoke(Request $request, MeetLifecycleService $lifecycle): JsonResponse
{
$secret = (string) config('meet.webhook_secret', '');
if ($secret === '') {
return response()->json(['error' => 'Webhook not configured.'], 503);
}
$signature = (string) $request->header('X-Ladill-Meet-Signature', '');
$body = $request->getContent();
$expected = hash_hmac('sha256', $body, $secret);
if ($signature === '' || ! hash_equals($expected, $signature)) {
return response()->json(['error' => 'Invalid signature.'], 401);
}
/** @var array<string, mixed> $payload */
$payload = $request->json()->all();
$event = (string) ($payload['event'] ?? '');
if ($event === '') {
return response()->json(['error' => 'Missing event.'], 422);
}
$lifecycle->handle($event, $payload);
return response()->json(['ok' => true]);
}
}