I have a query where I'm returning an awful lot of rows, so need to limit which fields I'm calling back, so I'm using select
and a where method.
However I also would like to limit it further by ignoring those in certain groups.
I currently have
$users = Adldap::search()
->select('extensionattribute2', 'mail', 'samaccountname')
->where('company', '=', $company)
->get();
Can someone help me add a where clause so that I can only select users from that aren't in a selection of 4 groups.
EG. Select all users, but not those in "Accounts", "HR", "Admins".