Server IP : 66.29.132.124 / Your IP : 3.138.134.149 Web Server : LiteSpeed System : Linux business141.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64 User : wavevlvu ( 1524) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /proc/self/root/home/wavevlvu/book24.ng/app/Rules/ |
Upload File : |
<?php namespace App\Rules; use App\Helpers\ReCaptchaEngine; use Illuminate\Contracts\Validation\Rule; class ValidCaptcha implements Rule { /** * Create a new rule instance. * * @return void */ public function __construct() { // } /** * Determine if the validation rule passes. * * @param string $attribute * @param mixed $value * @return bool */ public function passes($attribute, $value) { if (!$value or !ReCaptchaEngine::verify($value)) { return false; } return true; } /** * Get the validation error message. * * @return string */ public function message() { return __('Please verify captcha.'); } }