diff --git a/app/Http/Controllers/ItemSearchController.php b/app/Http/Controllers/ItemSearchController.php index c74a6ab..59007c7 100644 --- a/app/Http/Controllers/ItemSearchController.php +++ b/app/Http/Controllers/ItemSearchController.php @@ -57,10 +57,10 @@ class ItemSearchController extends Controller $tropd = Tropd::select($select); if($request->has('q')){ $search = strtolower($request->q); - $tropd->whereRaw("LOWER(x.NAMA_SKPD) LIKE '%$search%'"); + $tropd->whereRaw("LOWER(N_OPD) LIKE '%$search%'"); } $tropd->orderBy("C_OPD"); - $tropd->get(); + $tropd = $tropd->get(); } return response()->json($tropd); }