当前位置:网站首页>Laravel8 implementation of picture verification code
Laravel8 implementation of picture verification code
2022-06-23 05:15:00 【Life goes on and battles go on】
1、 adopt composer Install verification code package
stay Composer To carry out the following orders
composer require mews/captcha
2、 To configure
stay config/app.php in find aliases Add the following code to the array
'Captcha' => Mews\Captcha\CaptchaServiceProvider::class,
3、 Generate configuration files
stay Composer To carry out the following orders , If the pop-up option , Select to config, my config Of tag yes 11, Input 11 Back carriage return , Then it will be in config Generate configuration files in the folder ; In the configuration file length Is the number of digits of the generated verification code ;
php artisan vendor:publish
4、 The front end uses the verification code
Add... Where needed
<img src="{
{captcha_src()}}" id="captcha">Switch verification code
<script>
$('#captcha').click(function(){
$(this).prop('src',"{
{captcha_src()}}"+Math.random(1000,9999));
})
</script>边栏推荐
- teqc进行GNSS数据质量分析时生成的s文件介绍
- dolphinscheduler 1.2.1 数据迁移到 dolphinscheduler 2.0.5方法及迁移后数据测试记录
- [MAC] there is no source option in security and privacy
- bat中获取bat命令结果
- 618 how to break through the siege? Haier Zhijia: do a good job in digitalization of users
- 【微服务|Nacos】Nacos实现多环境和多租户的数据隔离
- 代码片段管理器SnippetsLab
- 【微服务|Nacos】Nacos版本相关问题一览
- MySQL stored procedure
- Implementation of slider view
猜你喜欢
随机推荐
HCIP第五次作业
【Proteus仿真】Arduino UNO+PCF8574+LCD1602+MPX4250电子秤
BGP实验
JSP入门级笔记
HCIP 作业 BGP总结
Unity中,如何在【编辑器】和【运行时】状态下读写一个ScriptableObject对象
微信小程序:未来老婆查询生成器
当SBAS遇上rtklib
Servlet self study notes
直接插入排序——【常见排序法(1/8)】
8 years' experience: monthly salary of 3000 to 30000, the change of Test Engineer
UI自动化定位利器-xpath实战
Event日志关键字:EventLogTags.logtags
Three methods of GNSS velocity calculation
Arduino flame sensor (with code)
微信小程序;AI智能配音助手
Visual display of TEQC quality analysis results using teqcplot
应用挂了~
新晋职场人的 技术进击?之旅
[OFDM communication] simulation of OFDM multi-user resource allocation based on MATLAB [including Matlab source code 1902]








