dsoloview/laravel-yandex-captcha

Yandex captcha integration for Laravel
4,121 12
Install
composer require dsoloview/laravel-yandex-captcha
Latest Version:2.2.0
PHP:>=8.0
License:MIT
Last Updated:Oct 21, 2025
Links: GitHub  ·  Packagist
Maintainer: dsoloview

Laravel Yandex Captcha

A small package that will allow you to use Yandex SmartCaptcha in your Laravel app

Features

  • Easy to use Yandex SmartCaptcha Blade component
  • Easy to use Yandex SmartCaptcha validation

Installation

Install dsoloview/laravel-yandex-captcha from composer

  composer require dsoloview/laravel-yandex-captcha

Usage

  1. Add to your .env YANDEX_CAPTCHA_CLIENT_KEY YANDEX_CAPTCHA_SERVER_KEY

  2. Publish config

php artisan vendor:publish --tag=yandex-captcha-config
  1. Add the Blade component to the form that needs a captcha
<form action="{{route('login')}}" method="post">  
 @csrf  
 <input type="text" name="email">  
<input type="password" name="password">  
<x-yandex-captcha></x-yandex-captcha>  
<button type="submit">Send</button>
</form>
  1. Add YandexCaptcha validation rule
<?php  
  
namespace App\Http\Requests;  
  
use Dsoloview\YandexCaptcha\Rules\YandexCaptcha;  
use Illuminate\Foundation\Http\FormRequest;  
  
class LoginRequest extends FormRequest  
{  
  public function rules(): array  
{  
  return [  
  'email' => ['required', 'email'],  
  'password' => ['required', 'string', 'min:8'],  
  'smart-token' => ['required', new YandexCaptcha]  
  ];  
}
  
  public function authorize(): bool  
  {  
  return true;  
  }  
}

If you want to customize blade component you can publish it with

php artisan vendor:publish --tag=yandex-captcha-view

Related Packages

captcha-com/laravel-captcha

Laravel Captcha Package -- BotDetect PHP Captcha generator integration for the L...

211,307 39
bonecms/laravel-captcha

Captcha integration for the Laravel 5

146,020 76
metrakit/visualcaptcha-laravel

Laravel library for visualCaptcha. VisualCaptcha is created by EmotionLoop

1,898 8
anhskohbo/no-captcha

No CAPTCHA reCAPTCHA For Laravel.

9,743,665 1,848
buzz/laravel-google-captcha

Google captcha for Laravel

1,177,783 208

Version History

Version Released PHP Laravel License
2.2.0 >=8.0 ^10 MIT
2.1.0 >=8.0 ^10 MIT
2.0.1 >=8.0 ^10 MIT
2.0.0 >=8.0 ^10
1.0.0 >=8.0 ^9