From 387c9149fd9c902fa9b90b35d3e6e9ed173d879e Mon Sep 17 00:00:00 2001 From: wahyuun Date: Tue, 10 Oct 2023 13:30:17 +0700 Subject: [PATCH] fix bug addMultiple Customer --- app/Http/Controllers/UserToProyekController.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/Http/Controllers/UserToProyekController.php b/app/Http/Controllers/UserToProyekController.php index a7a1cac..f6fca59 100644 --- a/app/Http/Controllers/UserToProyekController.php +++ b/app/Http/Controllers/UserToProyekController.php @@ -33,7 +33,10 @@ class UserToProyekController extends Controller public function addMultiple(Request $request){ $user_IDs = $request->user_id; - $data = UserToProyek::where("proyek_id", $request->proyek_id); + $data = UserToProyek::where([ + ["proyek_id" , $request->proyek_id], + ['is_customer',true] + ]); if($data){ $data->delete();