Create a random code and save it somewhere like a hidden text in your form or store it in a session, now create an image with the code with the following function:
http://nl1.php.net/imagettftext
Hope that helped you!
https://www.google.com/recaptcha
Developing your own captcha solution is very difficult to get right, you're much better off going with a pre-built solution such as recaptcha.
I Just published a simple captcha package for laravel 5 .
Check it out here : Simple Captcha package for Laravel 5
Works like a charm. :-)
You can use Google's reCAPTCHA to integrate Captcha on your Laravel website's contact form. You will only need to install 2 packages. It also comperatively easy to implement. I saw a tutorial on this. Here is the link: https://www.cloudways.com/blog/use-recaptcha-laravel-forms-validation/
If you want to create simple captcha code then this link can help you : https://itsolutionstuff.com/post/how-to-create-captcha-code-in-laravel-5example.html
Thank you
I think we should use captcha code on our registration form because captcha code prevent spams, bots etc. Most of the application we need to use captcha varification because it very important for security reason. There are several library to generate captcha image in Laravel.
In first step we will install captcha-com/laravel-captcha package for generate captcha code image. this package through we can generate generate captcha code image for our project. so first fire bellow command in your cmd or terminal:
composer require captcha-com/laravel-captcha:"4.*"
resources/views/webRegister.blade.php
<div class="col-md-6"> {!! captcha_image_html('ContactCaptcha') !!} <input class="form-control" type="text" id="CaptchaCode" name="CaptchaCode" style="margin-top:5px;">@if ($errors->has('CaptchaCode'))
<span class="help-block">
<strong>{{ $errors->first('CaptchaCode') }}</strong>
</span>
@endif
</div>
By:Xtreem Solution
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community