Download the PHP package shetabit/captcha without Composer
On this page you can find all versions of the php package shetabit/captcha. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download shetabit/captcha
More information about shetabit/captcha
Files in shetabit/captcha
Package captcha
Short Description Simple Laravel 5.2 Captcha Package
License
Homepage https://github.com/hamog/captcha
Informations about the package captcha
Laravel Captcha
This packages works with multiple drivers, and you can create custom drivers if there are not available in the current drivers list (below list).
Laravel Captcha
This is a Laravel Package for captcha Integration. This package supports Laravel 5.4+
.
This packages works with multiple drivers, and you can create custom drivers if there are not available in the current drivers list (below list).
List of contents
- Available drivers
- Install
- Configure
- How to use
- Add captcha in forms
- Validation
- Create custom drivers
- Change log
- Contributing
- Security
- Credits
- License
List of available drivers
- Simple : a simple image captcha.
- Others are under way.
you can create your own custom driver if not exists in the list , read the
Create custom drivers
section.
Install
Via Composer
Configure
If you are using Laravel 5.5
or higher then you don't need to add the provider and alias.
In your config/app.php
file add these two lines.
then run php artisan vendor:publish
to publish config/captcha.php
file in your config directory.
In the config file you can set the default driver
to use for all your payments. But you can also change the driver at runtime.
Choose what gateway you would like to use in your application. Then make that as default driver so that you don't have to specify that everywhere. But, you can also use multiple gateways in a project.
Then see the configs in the drivers array.
How to use
you have 2 steps to go
- add captcha in forms
- add validation
Add captcha in forms
In your code, use it like the below:
if you use simple
driver, you can change the styles and UI easily,
just have a look on resources/views/vendor/captchaSimpleDriver.blade.php
Validation
in order to validate forms wich use captcha, you can use captcha
validation role.
The below example shows every thing you need to know about captcha validation:
Create custom drivers:
First you have to add the name of your driver, in the drivers array and also you can specify any config parameters you want.
Now you have to create a Driver Map Class that will be used to pay invoices.
In your driver, You just have to extend Shetabit\Captcha\Abstracts\Driver
.
Ex. You created a class : App\Packages\CaptchaDriver\MyDriver
.
Once you create that class you have to specify it in the captcha.php
config file map
section.
Note:- You have to make sure that the key of the map
array is identical to the key of the drivers
array.
Change log
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONDUCT for details.
Security
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
Credits
- Hashem Moghaddari
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
All versions of captcha with dependencies
ext-gd Version *