有人可以帮助我,请问如何将其转换为laravel中的db查询
select a.extn
from access as a
where not exists( select * from users as u where u.accesskey= a.accesskey)
提前谢谢。
答案 0 :(得分:1)
假设访问表的型号名称为Access:
$result = Access::select('extn')->whereNotIn('accesskey', User::select('accesskey')->toArray());