PHP code example of quicksolve / laravel-calc
1. Go to this page and download the library: Download quicksolve/laravel-calc 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/ */
quicksolve / laravel-calc example snippets
use QuickSolve\Calc\Facades\QuickSolve;
// Basic calculation
$total = QuickSolve::setAmount(1000)
->addTax(15) // Adds 15% Tax
->applyFlatDiscount(50) // Deducts flat 50
->get(); // Returns 1100.00
// Formatting for display
echo QuickSolve::setAmount(1250.50)->format('LKR');
// Output: LKR 1,250.50