lumen
奇迹家
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
laravel 验证码 类
验证码: class SecurityCodeRepository { private $width; //验证码的宽 private $height; //验证码的高 private $codeNum; //验证码中的字符数 private $type; //验证码中字符的类型 1.数字 2.字母 3.字母加数字(默认) private $session; //存储验证码 private $fontStyle; //验原创 2021-09-14 11:30:18 · 278 阅读 · 0 评论 -
laravel项目中的查漏补缺(随时更新)
1.服务容器 bind() : 是向容器中绑定服务对象. make() : 是从容器中取出对象. //创建一个消息工厂 $text = new Container(); //绑定服务对象 $text->bind('服务对象名字',function (){ return new 服务对象类(); }); $text->bind('STU',function (){ return new Student(); }); //取出对象 $SMS = $messag原创 2021-08-31 19:12:57 · 216 阅读 · 0 评论 -
laravel中间件(等待更新)
中间件 1.验证登录: public function handle($request, Closure $next) { $token = $request->header('authorization'); if (empty($token)) return response(['code' => -1, 'msg' => '缺少用户信息']); $exists = DB::table('token_blacklist')->原创 2021-08-31 18:50:25 · 254 阅读 · 0 评论 -
我的laravel第一个项目学习到的初级知识
校验 (1)自我总结 required:非空 unique:数据唯一 string:必须是字符串类型 integer:必须是int类型 numeric:必须是数字 array:必须是数组类型 date:必须是时间类型 digits_between:必须在 :min 和 :max 位之间’ digits:值1,值2 在两个值长度之间 between:值1,值二 在两个值大小之间 max:最大长度 min:最小长度 regex:/^1[3456789][0-9]{9}$/: 手机号正则校验 (2)项目中原创 2021-08-31 11:16:15 · 250 阅读 · 0 评论
分享