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)1155MITPHPPHP ^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 1mo ago

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

28

—

LowBetter than 54% of packages

Maintenance44

Moderate activity, may be stable

Popularity15

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity41

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

438d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/11774a9685fdd873b073303a4a05daf3422c6447f177e972d1975477dc411b6a?d=identicon)[VVBphp](/maintainers/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

[lab404/laravel-impersonate

Laravel Impersonate is a plugin that allows to you to authenticate as your users.

2.3k16.4M48](/packages/lab404-laravel-impersonate)[santigarcor/laratrust

This package provides a flexible way to add Role-based Permissions to Laravel

2.3k5.4M43](/packages/santigarcor-laratrust)[overtrue/laravel-follow

User follow unfollow system for Laravel.

1.2k404.7k5](/packages/overtrue-laravel-follow)[codegreencreative/laravel-samlidp

Make your PHP Laravel application an Identification Provider using SAML 2.0. This package allows you to implement your own Identification Provider (idP) using the SAML 2.0 standard to be used with supporting SAML 2.0 Service Providers (SP).

263763.5k1](/packages/codegreencreative-laravel-samlidp)

PHPackages © 2026

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