Interactive Demos
Experience server-rendered speed and reactivity with zero SPA build tooling.
Inline Form Validation
State-changing POST requests carry CSRF tokens automatically and replace target containers with server validation feedback.
Controller & Template Code
// Controller Action handling POST:
#[Route('/api/demo/register', methods: ['POST'])]
public function register(Request $request): Response {
$email = trim((string)$request->request->get('email', ''));
if (!filter_var($email, FILTER_VALIDATE_EMAIL)) {
return new Response(
"<div class='status-badge status-warning'>Invalid email address</div>" .
"<p style='color: #f85149; font-size: 0.85rem; margin-top: 0.4rem;'>Please provide a valid mailbox format.</p>"
);
}
return new Response(
"<div class='status-badge status-success'>Email verified</div>" .
"<p style='color: #3fb950; font-size: 0.85rem; margin-top: 0.4rem;'>Invitation sent to <strong>" . htmlspecialchars($email) . "</strong></p>"
);
}