diff --git a/app/Http/Controllers/Api/RequestAssignmentController.php b/app/Http/Controllers/Api/RequestAssignmentController.php index b912ada..4cb78e8 100644 --- a/app/Http/Controllers/Api/RequestAssignmentController.php +++ b/app/Http/Controllers/Api/RequestAssignmentController.php @@ -36,8 +36,8 @@ class RequestAssignmentController extends Controller case 'non-business': $query->where(function ($q) { $q->where(function ($q2) { - $q2->whereRaw("LOWER(function_type) NOT LIKE ?", ['%fungsi usaha%']) - ->whereRaw("LOWER(function_type) NOT LIKE ?", ['%sebagai tempat usaha%']) + $q2->whereRaw("LOWER(TRIM(function_type)) NOT LIKE ?", ['%fungsi usaha%']) + ->whereRaw("LOWER(TRIM(function_type)) NOT LIKE ?", ['%sebagai tempat usaha%']) ->whereIn("status", PbgTaskStatus::getNonVerified()); }) ->orWhere(function ($q3) { @@ -50,8 +50,8 @@ class RequestAssignmentController extends Controller case 'business': $query->where(function ($q) { $q->where(function ($q2) { - $q2->whereRaw("LOWER(function_type) LIKE ?", ['%fungsi usaha%']) - ->orWhereRaw("LOWER(function_type) LIKE ?", ['%sebagai tempat usaha%']) + $q2->whereRaw("LOWER(TRIM(function_type)) LIKE ?", ['%fungsi usaha%']) + ->orWhereRaw("LOWER(TRIM(function_type)) LIKE ?", ['%sebagai tempat usaha%']) ->whereIn("status", PbgTaskStatus::getNonVerified()); }); });