Thinkphp6
w3138588955
这个作者很懒,什么都没留下…
展开
-
Thinkphp6+JWT集成
1.引入php-jwt包 composer require firebase/php-jwt 2.代码封装在lib文件中 <?php namespace app\lib; use Firebase\JWT\ExpiredException; use Firebase\JWT\JWT as JWTUtil; use think\Exception; use think\response\Json; class JWT { /** * 根据json web token设原创 2021-12-30 08:57:05 · 92 阅读 · 0 评论 -
Thinkphp6+接口访问频次
1.使用composer下载安装think-throttle composer require topthink/think-throttle 2. 组件以中间件的方式进行工作,在全局中间件中使用或多应用下的中间件中进行使用 return [ \think\middleware\Throttle::class, ]; 3.在 config/throttle.php 配置选项 // 中间件配置 return [ // 缓存键前缀,防止键值与其他应用冲突 'p.原创 2021-12-30 10:08:45 · 271 阅读 · 0 评论