PHPackages                             vvb/yandex-smart-captcha - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. vvb/yandex-smart-captcha

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

vvb/yandex-smart-captcha
========================

Yandex Smart Captcha integration for Laravel 10/11

0.1.15(1y ago)11941MITPHPPHP ^8.1

Since Jan 30Pushed 1y ago1 watchersCompare

[ Source](https://github.com/VVBphp/yandex-captcha-laravel)[ Packagist](https://packagist.org/packages/vvb/yandex-smart-captcha)[ RSS](/packages/vvb-yandex-smart-captcha/feed)WikiDiscussions main Synced today

READMEChangelog (2)Dependencies (1)Versions (8)Used By (0)

Yandex Smart Captcha для Laravel 10/11
======================================

[](#yandex-smart-captcha-для-laravel-1011)

[![Latest Version](https://camo.githubusercontent.com/7544f21d04ccd3e6173c35e5204e2432fe591c1f3f6da52953837b2983a91432/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7676622f79616e6465782d736d6172742d636170746368612e737667)](https://packagist.org/packages/vvb/yandex-smart-captcha)[![PHP Version](https://camo.githubusercontent.com/6518db1335bf20fdff07253dc6d6d0cec955b5fb6a8ef1382ac6d73687ecc07f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253345253344382e312d626c7565)](https://php.net)[![Laravel Version](https://camo.githubusercontent.com/32132c1aa9a99aa601ddcf58d6780fd989f1c0db3f6783f8fc1e90e3af46d02e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c61726176656c2d313025324631312d726564)](https://laravel.com)

Пакет для простой интеграции Yandex Cloud Smart Captcha в Laravel приложения

Установка
---------

[](#установка)

```
composer require vvb/yandex-smart-captcha
```

Настройка
---------

[](#настройка)

1. Получите ключи в [Yandex Cloud Console](https://cloud.yandex.ru/services/smartcaptcha)
2. Добавьте в `.env`:

```
YANDEX_SMART_CAPTCHA_CLIENT_KEY=your_client_key
YANDEX_SMART_CAPTCHA_SERVER_KEY=your_server_key
```

3. Опубликуйте конфиг:

```
php artisan vendor:publish --tag=config --provider="vvb\YandexSmartCaptcha\YandexSmartCaptchaServiceProvider"
```

Использование
-------------

[](#использование)

### 1. Добавление капчи в форму

[](#1-добавление-капчи-в-форму)

```

    @csrf

    Отправить

```

### 2. Валидация запроса

[](#2-валидация-запроса)

```
use vvb\YandexSmartCaptcha\Rules\YandexSmartCaptchaRule;

public function store(Request $request)
{
    $request->validate([
        'smart-token' => [new YandexSmartCaptchaRule],
    ]);

    // Ваша логика
}
```

Кастомизация сообщений
----------------------

[](#кастомизация-сообщений)

### Через конструктор

[](#через-конструктор)

```
new YandexSmartCaptchaRule(
    message: 'Неверная капча!',
    emptyMessage: 'Пожалуйста, пройдите проверку'
)
```

### Через языковые файлы

[](#через-языковые-файлы)

Добавьте в `resources/lang/xx/validation.php`:

```
return [
    'yandex_smart_captcha_rule' => 'Капча не пройдена',
    'yandex_smart_captcha_empty' => 'Требуется подтверждение капчи',
];
```

Локализация капчи
-----------------

[](#локализация-капчи)

Измените параметр `hl` в Blade-компоненте:

```

```

Поддерживаемые языки: `ru`, `en`, `uk`, `tr`, `lv`

Пример контроллера
------------------

[](#пример-контроллера)

```
use Illuminate\Http\Request;
use vvb\YandexSmartCaptcha\Rules\YandexSmartCaptchaRule;

class FormController extends Controller
{
    public function showForm()
    {
        return view('form');
    }

    public function submitForm(Request $request)
    {
        $request->validate([
            'email' => 'required|email',
            'smartcaptcha_token' => [
                new YandexSmartCaptchaRule(
                    __('validation.captcha_failed'),
                    __('validation.captcha_required')
                )
            ]
        ]);

        // Логика обработки формы
        return back()->with('success', 'Форма успешно отправлена!');
    }
}
```

Лицензия
--------

[](#лицензия)

MIT License.

---

[Документация Yandex SmartCaptcha](https://cloud.yandex.ru/docs/smartcaptcha/)

```

```

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance42

Moderate activity, may be stable

Popularity16

Limited adoption so far

Community5

Small or concentrated contributor base

Maturity42

Maturing project, gaining track record

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~6 days

Total

7

Last Release

484d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/19225426?v=4)[VVB](/maintainers/VVBphp)[@VVBphp](https://github.com/VVBphp)

### Embed Badge

![Health badge](/badges/vvb-yandex-smart-captcha/health.svg)

```
[![Health](https://phpackages.com/badges/vvb-yandex-smart-captcha/health.svg)](https://phpackages.com/packages/vvb-yandex-smart-captcha)
```

###  Alternatives

[statamic-rad-pack/runway

Eloquently manage your database models in Statamic.

135224.7k7](/packages/statamic-rad-pack-runway)[jeremy379/laravel-openid-connect

OpenID Connect support to the PHP League's OAuth2 Server. Compatible with Laravel Passport.

59437.0k9](/packages/jeremy379-laravel-openid-connect)[api-platform/laravel

API Platform support for Laravel

58171.4k14](/packages/api-platform-laravel)[duncanmcclean/statamic-cargo

Comprehensive e-commerce addon for Statamic. Build bespoke e-commerce sites without the complexity.

3416.7k](/packages/duncanmcclean-statamic-cargo)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
