Download the PHP package mhiggster/laravel-mortgage without Composer
On this page you can find all versions of the php package mhiggster/laravel-mortgage. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package laravel-mortgage
LaravelMortgage
A simple mortgage calculator for Laravel. Laravel-mortgage allows you to calculate the mortgage in two ways:
Annuity
An annuity is a series of payments made at equal intervals. Examples of annuities are regular deposits to a savings account, monthly home mortgage payments, monthly insurance payments and pension payments. Annuities can be classified by the frequency of payment dates.
Differentiated payment
Differentiated payment - this is an unequal monthly tranche proportionally reduced during the loan term. The largest payments - in the fourth quarter. “Median” payments are usually comparable to annuities.
Installation
Install the package through Composer.
Run the Composer require command from the Terminal:
composer require mhiggster/laravel-mortgage
Add a new line to the providers
array:
Mortgage\MortgageServiceProvider::class,
And optionally add a new line to the aliases
array:
'DifferentiatedPayment' => Mortgage\Facades\DifferentiatedPayment::class,
'Annuity' => Mortgage\Facades\Annuity::class,
And then publish the config file
php artisan vendor:publish --provider="Mortgage\MortgageServiceProvider"
Now you're ready to start using the laravel-mortgage in your application.
Overview
Look at one of the following topics to learn more about LaravelMortgage
- Usage
- Example
- Change log
- License
Usage
the Mortgage gives you two facades:
Annuity
and Differentiated
These facades gives you the following methods to use:
Annuity::getLoanTerm()
Simple getter which retrieves the loan term. Period for which the debtor must repay the loan
Annuity::getLoanAmount()
Simple getter which retrieves the loan amount. The method allows you to find out how much the debtor took a loan
Annuity::getInterestRate()
Simple getter which retrieves the interest rate. at what interest rate did the lender give a loan
Annuity::getMainDept()
Simple getter which retrieves the main dept. You can round them as you want
Annuity::showRepaymentSchedule()
This method returns a collection, which helps to find out termInMonth
, totoalDept
, percentDept
, mainDept
, indebtedness
using this data you can build a repayment schedule. an example you can see below
Annuity::getPercentAmount()
Amount accrued as a percentage
Annuity::effectiveRate()
The effective annual interest rate is the interest rate that is actually earned or paid on an investment.
Annuity::getTotalamount()
The total amount payable to the debtor
Annuity::setViscera(48, 8000000, 18)
If you want to use your own data
Similarly, all of these methods are available on the Differentiated facade.
Example
Below is a little example of how to list the cart content in a table:
Change log
Detailed changes for each release changelog
License
Copyright (c) 2019-present, Miras Nurmukhanbetov