闭包里为什么不用依赖注入呢?如
function(\think\db\Query $q) {
$q->where('sex', 0)->where('salary', '>', '8000');
}
tp5.1,我这样也能执行成功的。
你这是一个匿名函数,不是闭包
你这是一个匿名函数,不是闭包