fix customer admin

This commit is contained in:
afiq
2021-08-09 12:10:19 +08:00
parent bb32bf8832
commit 3ae009b3c7
2 changed files with 18 additions and 0 deletions
@@ -63,6 +63,23 @@ class CustomerController extends Controller
return response()->json($customer);
}
public function showOneCustomerByICAdmin(Request $request){
// $cawangan_all = Cawangan::on('mysql7')->get();
// $customer_all = [];
// foreach($cawangan_all as $index=>$cawangan){
$customer = Customer::on('mysql7')
->where('kplama','=',$request->ic)
->orWhere('kpbaru','=',$request->ic)
->first();
// if($customer != null){
// array_push($customer_all,$customer);
// }
// }
return response()->json($customer);
}
public function showOneCustomerByICMobile($ic){
$cawangan_all = Cawangan::on('mysql7')->get();