$a = ClassesStu::where([ ['name|major', 'like', '%' . $data['keyword'] . '%'], ['id', '>', 'stu_id'], // ['id', 'exp', Db::raw('>stu_id')], ['ec_id', '=', 184], ])->select(); halt($a->toArray());
['id', '>', 'stu_id']和 ['id', 'exp', Db::raw('>stu_id')]两种写法等价
exp必须配合raw使用