$tests = DB::table('view_tests')->whereIn('metric_id',$metricsIds)->paginate(4);
$tests = $tests->filter(function ($item) use ($var) {
return false !== stristr($item->name, $var) ||
false !== stristr($item->section_name, $var) ||
false !== stristr($item->method, $var) ||
false !== stristr($item->limit, $var) ||
false !== stristr($item->accredited_detail, $var);
return view('frontend.test_detailes',compact('tests'))->render();
Copy code