Download the PHP package dev-3bdulrahman/laravel-captcha without Composer
On this page you can find all versions of the php package dev-3bdulrahman/laravel-captcha. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download dev-3bdulrahman/laravel-captcha
More information about dev-3bdulrahman/laravel-captcha
Files in dev-3bdulrahman/laravel-captcha
Package laravel-captcha
Short Description A simple, standalone Laravel CAPTCHA package with multiple styles and difficulty levels
License MIT
Homepage https://github.com/Dev-3bdulrahman/Laravel-Captcha
Informations about the package laravel-captcha
Laravel Captcha
A simple, standalone Laravel CAPTCHA package with multiple styles and difficulty levels. No external dependencies or third-party services required!
โจ Features
- ๐จ Multiple Captcha Types: Image, Math, Text, and Slider captchas
- ๐ฏ Three Difficulty Levels: Easy, Medium, and Hard
- ๐ญ Multiple Visual Styles: Default, Modern, Minimal, and Colorful
- ๐ Fully Standalone: No Google reCAPTCHA or external services
- ๐ Easy Integration: Simple Blade components and validation rules
- ๐ฑ Responsive Design: Works perfectly on all devices
- โก Lightweight: Minimal dependencies, maximum performance
- ๐จ Customizable: Extensive configuration options
- ๐ผ๏ธ SVG Support: No GD Library required when using SVG format
๐ Requirements
- PHP 8.0 or higher
- Laravel 9.x, 10.x, or 11.x
- GD Library (optional - only required for PNG image captcha)
Note: Starting from version 2.0, you can use SVG captcha which doesn't require GD Library!
๐ฆ Installation
Install the package via Composer:
Publish the configuration file:
Publish the assets (CSS, JS):
Optionally, publish the views for customization:
๐ Quick Start
1. Add Captcha to Your Form
2. Validate the Captcha
That's it! ๐
๐ Usage
Captcha Types
Image Captcha (Default)
Math Captcha
Text Captcha
Slider Captcha
Difficulty Levels
- Easy: Simple challenges, fewer characters/operations
- Medium: Moderate complexity (default)
- Hard: Complex challenges with more noise and difficulty
Visual Styles
- default: Classic captcha appearance
- modern: Sleek, contemporary design
- minimal: Clean and simple
- colorful: Vibrant and eye-catching
Using SVG Captcha (No GD Library Required)
To use SVG captcha instead of PNG (which requires GD Library), update your configuration:
Or set the environment variable:
Then use it normally:
Using the Facade
Manual Validation
API Routes
The package automatically registers these routes:
GET /captcha/generate/{type?}- Generate captcha dataGET /captcha/image/{type?}- Get captcha imagePOST /captcha/verify- Verify captchaGET /captcha/refresh- Refresh captcha
โ๏ธ Configuration
The configuration file config/captcha.php allows you to customize:
๐จ Customization
Custom Questions for Text Captcha
Edit config/captcha.php:
Custom Styling
Publish the views and modify the CSS:
Then edit the files in resources/views/vendor/captcha/.
๐งช Testing
๐ Examples
Example 1: Contact Form
Example 2: Registration Form
๐ค Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
๐ License
This package is open-sourced software licensed under the MIT license.
๐จโ๐ป Author
Abdulrahman Mehesan
- Website: https://3bdulrahman.com/
- GitHub: @Dev-3bdulrahman
๐ Support
If you find this package helpful, please consider giving it a โญ on GitHub!
๐ธ Screenshots
Image Captcha
Math Captcha
Text Captcha
Slider Captcha
Made with โค๏ธ by Abdulrahman Mehesan
All versions of laravel-captcha with dependencies
illuminate/support Version ^9.0|^10.0|^11.0
illuminate/session Version ^9.0|^10.0|^11.0
intervention/image Version ^2.7|^3.0