PHP code example of masmaleki / calculator

1. Go to this page and download the library: Download masmaleki/calculator 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/ */

    

masmaleki / calculator example snippets


php artisan serv

http://127:0.0.1:8000/calculator

    'currencies' => [

        'EUR' => 1,
        'USD' => 1.1497,
        'JPY' => 129.53

    ],

    'commission_fees' => [

        'private' => [
            'deposit'=> 0.0003,
            'withdraw'=> 0.003
        ],
        'business' => [
            'deposit'=> 0.0003,
            'withdraw'=> 0.005
        ]

    ],

    'rate_url' => env('CALC_RATE_URL', 'https://developers.paysera.com/tasks/api/currency-exchange-rates'),

    'limit' => env('CALC_limit', 1000),
bash
php artisan vendor:publish --tag=Calculator-Assets
php artisan vendor:publish --tag=Calculator-Config
php artisan vendor:publish --tag=Calculator-Views
bash
php artisan vendor:publish --tag=Calculator-Tests
php artisan test