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.
- Host: GitHub
- URL: https://github.com/srph/laravel-antispam
- Owner: srph
- Created: 2016-02-08T11:44:30.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2016-03-11T16:08:10.000Z (over 10 years ago)
- Last Synced: 2025-01-26T17:15:49.404Z (over 1 year ago)
- Language: PHP
- Homepage:
- Size: 4.88 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: readme.md
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.