test ipay88
This commit is contained in:
@@ -27,6 +27,14 @@ class CustomerController extends Controller
|
||||
return response()->json($customer_all);
|
||||
}
|
||||
|
||||
public function getLatestCustomer($kodcaw){
|
||||
$cawangan = Cawangan::on('mysql7')->where('kodcaw','=',$kodcaw)->first();
|
||||
|
||||
$customer = Customer::on($cawangan['mysql'])->orderBy('nosiri','desc')->first();
|
||||
|
||||
return response()->json($customer);
|
||||
}
|
||||
|
||||
public function showAllCustomersByCawangan($kodcaw)
|
||||
{
|
||||
$cawangan = Cawangan::on('mysql7')->where('kodcaw','=',$kodcaw)->first();
|
||||
|
||||
@@ -29,6 +29,8 @@ $router->group(['prefix'=>'api'], function () use ($router){
|
||||
$router->delete('customers/{kodcaw}/{nokp}', ['uses' => 'CustomerController@delete']);
|
||||
$router->put('customers/update/{nokp}', ['uses' => 'CustomerController@customerUpdate']);
|
||||
|
||||
$router->get('customers/latest/{kodcaw}',['uses'=>'CustomerController@getLatestCustomer']);
|
||||
|
||||
//Gadai API
|
||||
$router->get('gadai',['uses'=>'GadaiController@showAllGadais']);
|
||||
$router->get('gadai/{noic}',['uses'=>'GadaiController@showOneGadai']);
|
||||
|
||||
Reference in New Issue
Block a user