I am working on a Laravel project and want to post multiple values in a not like clause. I have tried the following way with no success.
$exclude_emails=['odz', 'test.com'];
$vendors=\DB::table("vendor_infos")
->where("vendor_infos.email", 'not like', '%'.$exclude_emails.'%' )
->orderByRaw("RAND()")->take(8)->get(['vendor_infos.*']);
I have also tried to pass it as string, but still no success.
You can do this way,
I hope this will work
EDIT
Or you can try other way.