Jul 14, 2020
7
Level 4
Search a List of data
I want to search a list of data like : 12334 23445 87878 77878 34455 which i copied from excel and paste it on my search form, then will get that data
kindly advice me the best way and example how i can archieve this
Level 20
You can add it before the get() like this
$unitList = store::where(function ($q) use ($searchValues) {
foreach ($searchValues as $value) {
$q->orWhere('unit_id', 'LIKE', '%' .$value. '%');
}
})->where('status', 0)->get();
Please or to participate in this conversation.