fix customer admin
This commit is contained in:
@@ -63,6 +63,23 @@ class CustomerController extends Controller
|
|||||||
return response()->json($customer);
|
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){
|
public function showOneCustomerByICMobile($ic){
|
||||||
|
|
||||||
$cawangan_all = Cawangan::on('mysql7')->get();
|
$cawangan_all = Cawangan::on('mysql7')->get();
|
||||||
|
|||||||
@@ -37,6 +37,7 @@ $router->group(['prefix'=>'api'], function () use ($router){
|
|||||||
$router->get('customers/laporan/{kodcaw}/{tarikh}',['uses'=>'CustomerController@getLaporanCustomers']);
|
$router->get('customers/laporan/{kodcaw}/{tarikh}',['uses'=>'CustomerController@getLaporanCustomers']);
|
||||||
$router->get('customers/latest/{kodcaw}',['uses'=>'CustomerController@getLatestCustomer']);
|
$router->get('customers/latest/{kodcaw}',['uses'=>'CustomerController@getLatestCustomer']);
|
||||||
$router->put('customers/information/update/admin', ['uses' => 'CustomerController@customerUpdateAdmin']);
|
$router->put('customers/information/update/admin', ['uses' => 'CustomerController@customerUpdateAdmin']);
|
||||||
|
$router->get('admin/customers/nokp/search',['uses'=>'CustomerController@showOneCustomerByICAdmin']);
|
||||||
|
|
||||||
//Gadai API
|
//Gadai API
|
||||||
$router->get('gadai',['uses'=>'GadaiController@showAllGadais']);
|
$router->get('gadai',['uses'=>'GadaiController@showAllGadais']);
|
||||||
|
|||||||
Reference in New Issue
Block a user