diff --git a/app/Http/Controllers/GadaiController.php b/app/Http/Controllers/GadaiController.php index 40c9f7e..ab25a7f 100644 --- a/app/Http/Controllers/GadaiController.php +++ b/app/Http/Controllers/GadaiController.php @@ -3246,8 +3246,12 @@ class GadaiController extends Controller return $upah_semasa; } - public function updateJBGsemasa(){ - $cawangan = Cawangan::on('mysql7')->get(); + public function updateJBGsemasa(Request $request){ + if($request->zone == 'all'){ + $cawangan = Cawangan::on('mysql7')->get(); + }else{ + $cawangan = Cawangan::on('mysql7')->where('zone',$request->zone)->get(); + } $current = Carbon::now(); foreach($cawangan as $cawangan_mysql){