An open API service indexing awesome lists of open source software.

https://github.com/srph/laravel-antispam

An antispam quiz package for Laravel.
https://github.com/srph/laravel-antispam

Last synced: about 1 month ago
JSON representation

An antispam quiz package for Laravel.

Awesome Lists containing this project

README

          

## laravel-antispam
An antispam package for Laravel.

It provides a basic quiz for the registrant/guest to answer, effective for registration forms.

## Setup
Add the package to your list of `ServiceProvider`s and `Facade`s (located in `config/app.php`).
```php
return [
'providers' => [
// Your other providers...
Srph\LaravelAntiSpam\AntiSpamServiceProvider::class
],

'facade' => [
// Your other facades...
'AntiSpam' => Srph\LaravelAntiSpam\Facade::class
]
];
```

Publish the package.
```bash
artisan vendor:publish srph/laravel-antispam
```

Configure the package located in `config/packages/antispam/app.php`.

## Usage
Go to your form, then add the required inputs.
```html


{{ AntiSpam::getInput() }}

{{ AntiSpam::getQuestion() }}


```

Add the validation rule `antispam` to the antispam input.
```php
$input = ['antispam' => Input::get('antispam')];
$rules = ['antispam' => 'required|antispam'];
Validator::make($input, $rules);
```

You should be good to go ;).

## Dropped and Unmaintained
This project never got published, and is no longer maintained.