Laravel 查询在使用 where 和 orWhere 子句时显示错误数据

Laravel query showing wrong data while use where and orWhere clause

Users::where('application_ID', '=', $request->application_ID)
->where(function ($query) {
    $query->where('app_status','!=','')
          ->orWhere('app_status','!=','Accept')
          ->orWhere('app_status','!=','Reject')
          ->orWhere('app_status','!=','Comm Accept')
          ->orWhere('app_status','!=','Comm Reject');
})->get();

输出:

select * from `user` where `application_ID` = '0320120332330' and (`app_status` != 'Accept' or `app_status` != 'Reject' or `app_status` != 'Comm Accept' or `app_status` != 'Comm Reject')

在上面的查询中,如果在我的 table 中有 app_status = Accept, Reject, Comm Accept and Comm Reject,那么查询 return 所有与 application_ID = '0320120332330' 相关的记录,但我已经提到如果 app_status != Accept, Reject, Comm Accept and Comm Reject 然后又 return 全部记录下来。不知道为什么?

在不在的地方使用

Users::where('application_ID', '=', $request->application_ID)
->whereNotIn('app_status', ['', 'Accept', 'Reject', 'Comm Accept', 'Comm Reject'])->get();