I am trying to filter a users list to remove any test accounts with certain email extensions.
My query:
User::where('email', 'NOT LIKE', '%test.com')
->where('email', 'NOT LIKE', '%test1.com')
->where('email', 'NOT LIKE', '%test2.com')
->where('email', 'NOT LIKE', '%test3.com')
I'm wondering if there's a better way to write this in one statement like whereNotIn but that doesn't seem to work. I'm looking for something like this:
User::whereNotLike('email', [
'%test.com',
'%test1.com',
'%test2.com',
'%test3.com',
]);