Skip to content

apxcde/loan-amortization

Repository files navigation

PHP composer package for loan amortization

Latest Version on Packagist Tests Total Downloads

Installation

You can install the package via composer:

composer require apxcde/loan-amortization

Usage

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);

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.