随笔分类 -  swoft

摘要:不仅仅局限于 MVC 。将数据在model 这一个层面剖析开,优雅的处理数据 逻辑,缓存,业务,数据库操作的烦恼。 这个思路也适用于 thinkphp,hyperf,imi 等框架。不再简单的 实现 controller->model->view 的处理过程。 简化代码,每一层清晰地定义相应处理的数 阅读全文
posted @ 2020-12-17 17:33 黑锦鲤 阅读(320) 评论(0) 推荐(0) 编辑
摘要:扩展elasticsearch 的 组队 官网上好像并没有这个文档。找了一下有大佬补充的 在此感谢大佬 composer require limingxinleo/swoft-elasticsearch 请注意elasticsearch 文件位置。 // 每一个ES服务地址,是一个数组,支持配置详细 阅读全文
posted @ 2020-08-18 17:49 黑锦鲤 阅读(339) 评论(0) 推荐(0) 编辑
摘要:https://dy.163.com/article/E14KTSAC0511HSJK.html 原文章地址,传送门 因为看到韩天峰大佬的这个,协程那简直不要太酸爽。所以我也尝试一下。 服务器环境lnmp+swoole linux(centos7.4),(nginx1.14),(php7.2) 框架 阅读全文
posted @ 2020-07-29 11:50 黑锦鲤 阅读(411) 评论(0) 推荐(0) 编辑
摘要:挥手,握手就不解释了。直接上代码 启动swoft ws的服务 <?php declare(strict_types=1); /** * This file is part of Swoft. * * @link https://swoft.org * @document https://swoft. 阅读全文
posted @ 2020-05-22 10:04 黑锦鲤 阅读(864) 评论(0) 推荐(0) 编辑
摘要:1、获取access_token、两个小时门票过期重新获取 public function AccessToken(){ $time = time(); $key = "wx68065208096access_token"; $accessData = DB::table('db_wx_token' 阅读全文
posted @ 2020-03-12 17:41 黑锦鲤 阅读(379) 评论(0) 推荐(0) 编辑
摘要:1、swoft 获取上传的文件 。官方文档上面没有看到 $files = $request->getUploadedFiles(); $file = $files['file']; 2、在模型文件中引入sdk require_once "/home/www/swoft/app/Model/Entit 阅读全文
posted @ 2020-03-12 17:31 黑锦鲤 阅读(524) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示