update jbg

This commit is contained in:
Afiq
2022-04-01 10:28:24 +08:00
parent a5f0d98f9a
commit aa2779c493
+6 -2
View File
@@ -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){