Skip to content

Commit

Permalink
Merge pull request #249 from Sergej-Tihonov/feature/improve-disable-f…
Browse files Browse the repository at this point in the history
…eature

Improved disable feature
  • Loading branch information
mewebstudio authored Dec 14, 2022
2 parents 68e3539 + eb4e427 commit 9aa77b8
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
16 changes: 13 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,11 @@ for Laravel 4 [Captcha for Laravel Laravel 4](https://github.com/mewebstudio/cap
* [Installation](#installation)
* [Usage](#usage)
* [Configuration](#configuration)
+ [Custom settings:](#custom-settings)
+ [Disable validation:](#disable-validation)
* [Example Usage](#example-usage)
+ [Session Mode:](#session-mode-)
+ [Stateless Mode:](#stateless-mode-)
+ [Session Mode:](#session-mode)
+ [Stateless Mode:](#stateless-mode)
- [Return Image](#return-image)
- [Return URL](#return-url)
- [Return HTML](#return-html)
Expand Down Expand Up @@ -94,8 +96,9 @@ for Laravel 5.1+
]
```

## Configuration

## Configuration
### Custom settings:
To use your own settings, publish config.

```$ php artisan vendor:publish```
Expand All @@ -115,6 +118,13 @@ return [
// ...
];
```
### Disable validation:
To disable the captcha validation use `CAPTCHA_DISABLE` environment variable. e.g. **.env** config:

```php
CAPTCHA_DISABLE=true
```


## Example Usage
### Session Mode:
Expand Down
2 changes: 1 addition & 1 deletion config/captcha.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

return [
'disable' => env('CAPTCHA_DISABLE', !str_contains(env('APP_ENV', 'local'), 'prod')),
'disable' => env('CAPTCHA_DISABLE', false),
'characters' => ['2', '3', '4', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'j', 'm', 'n', 'p', 'q', 'r', 't', 'u', 'x', 'y', 'z', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'J', 'M', 'N', 'P', 'Q', 'R', 'T', 'U', 'X', 'Y', 'Z'],
'default' => [
'length' => 9,
Expand Down

0 comments on commit 9aa77b8

Please sign in to comment.