Configuration
Customize Easy Captcha to fit your application's security and design requirements.
Configuration File
After publishing, your configuration file will be located at config/easy_captcha.php.
return [
'enabled' => env('EASY_CAPTCHA_ENABLED', true),
'type' => env('EASY_CAPTCHA_TYPE', 'math'), // options: random, math, alphabet, number, google, turnstile
'font_path' => env('EASY_CAPTCHA_FONT_PATH', 'IndieFlower'),
// ...
];
Bundled Fonts
You can use the following fonts by name in your .env or config:
- IndieFlower (Default - Handwritten)
- SpecialElite (Typewriter style)
- CourierPrime (Monospace)
- Ubuntu-Bold
- UbuntuMono-Regular
- Ubuntu-Italic
Environment Variables
Most options can be controlled directly via your .env file:
EASY_CAPTCHA_ENABLED=true
EASY_CAPTCHA_TYPE=math
Supported Types
- random: Alphanumeric characters (e.g., A1B2C3).
- math: Simple mathematical expressions (e.g., 5 + 3).
- alphabet: Letters only.
- number: Digits only.
- google: Integration with Google reCAPTCHA.
- turnstile: Integration with Cloudflare Turnstile (Latest!).
EASY_CAPTCHA_TYPE=google
EASY_CAPTCHA_GOOGLE_SITE_KEY=your-site-key-here
EASY_CAPTCHA_GOOGLE_SECRET_KEY=your-secret-key-here
Cloudflare Turnstile Setup
To use Cloudflare Turnstile, set the type to turnstile and provide your site and secret
keys:
EASY_CAPTCHA_TYPE=turnstile
EASY_CAPTCHA_TURNSTILE_SITE_KEY=your-site-key-here
EASY_CAPTCHA_TURNSTILE_SECRET_KEY=your-secret-key-here
Easy Captcha