Replace captcha system

This commit is contained in:
2026-01-18 18:37:08 +01:00
parent e5ef197ed6
commit ccfd5b996b
15 changed files with 242 additions and 200 deletions

View File

@@ -5,6 +5,8 @@ namespace App\Http\Controllers;
use App\Models\Contact;
use Illuminate\Http\Request;
use GrantHolle\Altcha\Rules\ValidAltcha;
class ContactController extends Controller
{
/**
@@ -25,7 +27,7 @@ class ContactController extends Controller
'email' => 'required|max:50',
'message' => 'required|max:1000',
'subject' => 'required|max:50',
'captcha' => 'required|captcha',
'altcha' => ['required', new ValidAltcha],
]);
$contact = new Contact();
@@ -37,9 +39,4 @@ class ContactController extends Controller
return back()->with('status', 'contact-submitted');
}
public function reloadCaptcha(): \Illuminate\Http\JsonResponse
{
return response()->json(['captcha'=> captcha_img()]);
}
}