摘要: 修改器的作用是可以在数据赋值的时候自动进行转换处理 class Product extends Model{ public function setNameAttr($value) { return strtolower($value); } } $user = new Model(); $user 阅读全文
posted @ 2020-07-20 14:19 HighKK 阅读(157) 评论(0) 推荐(0) 编辑
摘要: 模型设置数据表 <?php namespace app\index\model; use think\Model; class Product extends Model{ public function getStatusAttr($value) { $status = [-1=>'删除',0=> 阅读全文
posted @ 2020-07-20 14:11 HighKK 阅读(150) 评论(0) 推荐(0) 编辑
摘要: 1、普通模式:关闭路由,完全使用默认的PATH_INFO方式URL; 'url_route_on' => false, 2、混合模式:开启路由,并使用路由定义+默认PATH_INFO方式的混合; 'url_route_on' => true, 'url_route_must'=> false, 3、 阅读全文
posted @ 2020-07-20 13:56 HighKK 阅读(145) 评论(0) 推荐(0) 编辑