我正在尝试执行一个查询,该查询仅显示表人员和表hr_validations中的内容,但不显示表coo_validations中的内容。 以下是我的laravel代码:
$loan = staff::select('staff_name','staff_id_fk','loan_amount','loan_tenor','hr_validations.id')
->join('hr_validations','hr_validations.staff_id_fk','=','staff.staff_id')
->whereNotIn('hr_validations.id','coo_validations.loan_id');
return([$loan->pluck('staff_id_fk'), $loan->pluck('loan_amount'), $loan->pluck('loan_tenor'), $loan->pluck('hr_validations.id')]);

但是它返回了一个错误("为foreach&#34提供的无效参数;)。任何提供的帮助将不胜感激!