thinkphp5+ 多对多关系模型根据中间表字段排序
thinkphp 多对多关系模型根据中间表排序 使用`belongsToMany`方法定义多多关系,关联表都被重命名为pivot,所以只需要在模型中关系定义时加上 -order('pivot.id') 即可,代码如下
ThinkTemplate 模板中包含动态模板
动态模板的路径可以是一个变量,但是不能是字符串和变量构成的字符串路径
ThinkTemplate 控制器中配置缓存模板编号
ThinkTemplate 默认的模板缓存是根据模板文件生成缓存文件,子模板变化和内容变化缓存不会更新,这是一种编译缓存。
thinkphp8.0 composer 更新报错
Script @php think service:discover handling the post-autoload-dump event returned with error code 255
thinkphp6使用结巴分词
thinkphp安装结巴分词需要php的版本= 5.3,如果使用thinkphp6.0那么就没有问题了,因为thinkphp6.0需要php版本PHP7.1+
composer安装tp8出现“ curl error 28 while downloading https://repo.packagist.org/packages.json”错误
composer安装tp8出现“ curl error 28 while downloading https://repo.packagist.org/packages.json”错误