added function to update all ig
This commit is contained in:
@@ -3834,18 +3834,20 @@ class AdminPageController extends Controller
|
||||
|
||||
$cawangan = Cawangan::on('mysql7')->simplePaginate(5);
|
||||
$check = app(AccountService::class);
|
||||
|
||||
$array_all = [];
|
||||
$array_all = ['current_page' => $cawangan->currentPage()];
|
||||
foreach($cawangan as $caw){
|
||||
try{
|
||||
$test =$check->checkAccount($caw['kodcaw'],'8');
|
||||
$array_all[$caw['kodcaw']] = $test;
|
||||
$test =$check->checkAccount($caw['kodcaw'],$request->month);
|
||||
$array_all['data'][$caw['details_caw']] = $test;
|
||||
}catch(\Exception $e){
|
||||
Log::error($caw['kodcaw']);
|
||||
Log::error($e->getMessage());
|
||||
Log::error($e);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
return response()->json($array_all);
|
||||
$response = $array_all;
|
||||
|
||||
return response()->json($response);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user