当前位置:网站首页>Laravel8 implementation of picture verification code
Laravel8 implementation of picture verification code
2022-06-25 14:05:00 【Chenqing Nuo language】
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>
边栏推荐
- Qt内存映射
- Prototype and prototype chain - constructor and instanceof
- Replace element - counter use of content (2)
- Cesium learning notes
- Insight into heap and stack stored in new string() /string() in JS
- As a software testing engineer, how do you think to ensure software quality?
- 测一测你的挣钱能力有多强?未来的你将从事什么职业?
- Error1822 and error1824 are displayed in the database
- 电脑必须打开的设置
- “移动云杯”算力网络应用创新大赛火热报名中!
猜你喜欢

多台云服务器的 Kubernetes 集群搭建

'NVIDIA SMI' is not an internal or external command, nor is it a runnable program or batch file

shell 变量 入门

Suanli & NFT trading platform f3 The exclusive NFT project of XYZ, hash eagle, will be grandly launched

Rust, the best choice for programmers to start a business?

程序員為什麼要軟一點?

On the simple realization of Sanzi chess game and the method of judging the victory of n-zi chess

Rust, le meilleur choix pour un programmeur de démarrer une entreprise?

Rust,程序員創業的最佳選擇?

英語中的九大詞性與九大時態
随机推荐
腾讯云搭建Socks5多IP代理服务器实现游戏单窗口单IP完美搭建教程附带工具「建议收藏」
如何在 2022 年为 Web 应用程序选择技术堆栈
How to determine if a web worker has been created or closed
对白:推荐系统快速入门路线及各知识点总结
Shell built-in commands
Getting started with numpy Library
哈希表、哈希冲突
mysql数据库压缩备份_Mysql备份压缩及恢复数据库方法总结
论文阅读:Graph Contrastive Learning with Augmentations
Mise en place d'un Cluster kubernets avec plusieurs serveurs Cloud
“移动云杯”算力网络应用创新大赛火热报名中!
shell 数组
Windows下MySQL的安装和删除
Cesium learning notes
[proteus simulation] 51 MCU +ds1302+lcd1602 display
Suanli & NFT trading platform f3 The exclusive NFT project of XYZ, hash eagle, will be grandly launched
多台云服务器的 Kubernetes 集群搭建
Is it safe for Guosen Securities to open an account?
Test your earning power? What will you do in the future?
使用调试工具调试博图TCP连接所遇到的问题