New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

dsoloview/laravel-yandex-captcha

Yandex captcha integration for Laravel
4,129 12
Install
composer require dsoloview/laravel-yandex-captcha
Latest Version:2.2.0
PHP:>=8.0
Laravel:10
Older releases:9
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

bonecms/laravel-captcha

Captcha integration for Laravel

147,316 76
eusonlito/captcha

A simple package to generate and check captchas

18,913 6
mehedi/laravel-captcha

Captcha integration for the Laravel 6

13,630 0
nikazooz/laravel-captcha

Laravel package to generate and validate CAPTCHA.

4,564 0
iorme/simplecaptcha

Create simple captcha using php

2,425 1

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