hailkongsan / laravel-antibotlink
v0.1
2020-11-21 11:38 UTC
Requires
- illuminate/session: ^6.0 || ^7.0 || ^8.0
- intervention/image: ^2.5
- nesbot/carbon: ^2.0
Requires (Dev)
- orchestra/testbench: ^4.0 || ^5.0 || 6.0
- phpunit/phpunit: ^8.0
This package is auto-updated.
Last update: 2024-04-21 20:01:26 UTC
README
Installation
composer require hailkongsan/laravel-antibotlink
Setup
This package supports the auto-discovery feature of Laravel 5.5 and above, So skip these Setup
instructions if you're using Laravel 5.5 and above.
In app/config/app.php
add the following :
1- The ServiceProvider to the providers array :
Hailkongsan\AntiBotLink\AntiBotLinkServiceProvider::class,
2- The class alias to the aliases array :
'AntiBotLink' => Hailkongsan\AntiBotLink\Facades\AntiBotLink::class
3- Publish vendor
php artisan vendor:publish --provider="Hailkongsan\AntiBotLink\AntiBotLinkServiceProvider" --tag="config"
Usage
Validation
$validate = Validator::make(Input::all(), [ 'antibotlink' => 'required|antibotlink' ]);
Custom Validation Message
Add the following values to the custom
array in the validation
language file :
'custom' => [ 'antibotlink' => [ 'required' => 'Please verify that you are not a robot.', 'antibotlink' => 'Invalid AntiBotLink verification!', ], ],
Todo
- Clean up and refactor code.
- Add more option to render image function.
- Finish readme (usage).