PHP code example of apxcde / loan-amortization
1. Go to this page and download the library: Download apxcde/loan-amortization library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
apxcde / loan-amortization example snippets
use Apxcde\LoanAmortization\LoanAmortization;
$amount = 200000;
$termYears = 5;
$annualInterestRate = 12;
$loan_data = [
'loan_amount' => (float) $amount,
'term_years' => $termYears,
'interest' => $annualInterestRate,
'term_months' => $termYears * 12,
'starting_date' => Carbon::now(),
'remaining_months' => $termYears * 12,
];
$loan_calculation = new LoanAmortization($loan_data);