
TinkPHP
冯不疯先生
这个作者很懒,什么都没留下…
展开
-
TinkPHP6.0框架中的event事件用法
在此只介绍监听类的用法一、创建监听类php think make:listener TestListener修改 TestListener.php文件代码<?phpdeclare (strict_types = 1); namespace app\listener; class TestListener{ /** * 事件监听处理 * * @return mixed */ public function ...原创 2021-08-06 10:33:17 · 301 阅读 · 0 评论 -
tp6中实现毫秒级定时任务功能
一、TP6使用workerman1、安装composer require workerman/workerman2、创建Timerphp think make:command Timer3、实现实例class Timer extends Command{ /** * @var int */ protected $timer; /** * @var int|float */ protected $i.转载 2021-08-06 10:15:03 · 856 阅读 · 0 评论 -
Tinkphp6数据库迁移与填充
一、数据库迁移首先安装TP6迁移工具composer require topthink/think-migration使用指令创建迁移文件 首字母必须大写(甲鱼的臀部)php think migrate:create AnyClassNameYouWant如果不记得了指令也可以使用如下指令查看TP6的命令php think 官方实例<?phpuse think\migration\Migrator;use think\migration\db\Co..原创 2021-07-14 20:57:22 · 977 阅读 · 3 评论