Loan data
This commit is contained in:
@@ -64,6 +64,7 @@ $routes->get('/digiusers/v1/employers', 'Employers::approvedEmploye
|
||||
|
||||
$routes->post('/digiusers/v1/loan/apply', 'Loan::loanApply');
|
||||
$routes->get('/digiusers/v1/loan/loanlist', 'Loan::loanlist');
|
||||
$routes->get('/digiusers/v1/loan/loandetail', 'Loan::loanDetail');
|
||||
|
||||
$routes->get('/digiusers/v1/loan/paymentcard/add', 'Loan::addPaymentCard');
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
namespace App\Controllers;
|
||||
|
||||
use CodeIgniter\API\ResponseTrait;
|
||||
use PHPUnit\Util\Json;
|
||||
|
||||
class Loan extends BaseController
|
||||
{
|
||||
@@ -161,6 +162,31 @@ disbursement
|
||||
return $this->respond([], 200);
|
||||
}
|
||||
|
||||
|
||||
public function loanDetail(){
|
||||
|
||||
$in = $this->request->getGet();
|
||||
$data = [];
|
||||
|
||||
$mysql ="SELECT * FROM applications WHERE customer_uid = '". $in["uid"]."' AND uid='". $in["application_uid"]."' ";
|
||||
$query = $this->db->query($mysql);
|
||||
$row = $query->getRowArray();
|
||||
$row["loan_detail"] = json_decode( $row["loan_detail"] ); // "ameye";
|
||||
//$row["loan_detail"]["employment"] = json_decode( $row["loan_detail"]["employment"] );
|
||||
$employment_line = json_decode( $row["loan_detail"]->employment ); //["employment"] ;
|
||||
$row["employment"] = $employment_line ; // json_decode( $row["loan_detail"]["employment"] );
|
||||
|
||||
$loan_reference_line = json_decode( $row["loan_detail"]->loan_reference );
|
||||
$row["loan_reference"] = $loan_reference_line ;
|
||||
|
||||
$disbursement_line = json_decode( $row["loan_detail"]->disbursement );
|
||||
$row["disbursement"] = $disbursement_line ;
|
||||
|
||||
|
||||
|
||||
return $this->respond(["loan"=>$row], 200);
|
||||
}
|
||||
|
||||
public function startProcessing(){
|
||||
return [];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user