1. Go to this page and download the library: Download ms41/laravel-captcha13 library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
ms41 / laravel-captcha13 example snippets
use Illuminate\Http\Request;
use Shahid\Captcha\Facades\Captcha;
public function submit(Request $request)
{
$request->validate([
'captcha' => [' ->withInput();
}
return back()->with('success', 'Captcha verified successfully!');
}
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Route;
use Shahid\Captcha\Facades\Captcha;
Route::get('/captcha-test', function () {
return view('captcha-test');
});
Route::post('/captcha-test', function (Request $request) {
$request->validate([
'captcha' => ['