FCaptcha icon indicating copy to clipboard operation
FCaptcha copied to clipboard

Example: Laravel form with server-side verification

Open cport1 opened this issue 1 month ago • 2 comments

examples/ has runnable integrations for Hono, Supabase, FastAPI and a plain Node contact form. Nothing covers PHP yet.

What to do

Add examples/laravel/ with:

  • a Blade form that renders the checkbox widget
  • a validation rule (or middleware) that verifies the posted fcaptcha_token against /turnstile/v0/siteverify using Laravel's HTTP client
  • feature tests for a valid, a replayed and a missing token (fake the HTTP call)
  • a README with how to run it against a local FCaptcha server

Done when

The example runs from its README, and a link is added under "Runnable examples" in the main README.

cport1 avatar Oct 13 '26 14:10 cport1

Thanks, @Vedant-200 — a runnable Laravel example would be welcome. Please keep it focused on the Blade form, server-side rule, tests, and run instructions requested above. Keep the verification secret server-side and make sure rejected/replayed, missing, and unavailable verification never execute the protected action. Please link the current FCaptcha integration contract and include the commands/results used to test the example.

cport1 avatar Nov 17 '26 18:11 cport1