nelsons/geetest

Geetest Package for Laravel

v1.0.0 2020-04-20 08:51 UTC

This package is auto-updated.

Last update: 2024-04-20 17:34:56 UTC


README

This package is no longer maintained but not archived, pull requests and upgrade is welcomed. Thanks very much.

Build Status DUB Support

Installation

This Package now supports Geetest 3.1.

To get the latest version of Laravel Geetest, simply require the project using Composer:

$ composer require nelsons/geetest

then run:

$ composer update

Next, You should need to register the service provider. Open up config/app.php and add following into the providers key:

Nelsons\Geetest\GeetestServiceProvider::class

And you can register the Geetest Facade in the aliases of config/app.php :

'Geetest' => Nelsons\Geetest\Geetest::class

Configuration

To get started, you need to publish vendor assets using the following command:

$ php artisan vendor:publish --tag=geetest

This will create a config file named config/geetest.php which you can configure geetest as you like.

It will also generate a views folder named resources/views/vendor/geetest, there will be a view file named geetest.blade.php. Here you can configure styles of geetest. For example, you can change the script alert() as you like.

Usage

Firstly, You need to register in Geetest. Creating an app and get ID and KEY.

Then configure them in your .env file because you'd better not make them public.

Add them to .env as follows:

GEETEST_ID=0f1097bef7xxxxxx9afdeced970c63e4
GEETEST_KEY=c070f0628xxxxxxe68e138b55c56fb3b

License

Laravel Geetest is licensed under The MIT License (MIT).