Download the PHP package amkas/currency-converter without Composer

On this page you can find all versions of the php package amkas/currency-converter. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package currency-converter

Currency Converter

Currency Converter is a simple easy to use package for Laravel for currency conversion.

Getting Started

Install Currency Converter via composer. Note: If you do not have composer yet, you can install it by following the instructions on https://getcomposer.org

Step 1. Install package

composer require amkas/currency-converter

Step 2. Register the Currency Converter service provider (Optional)

in bootstrap/providers.php you can add following line

Step 3. Publish Assets

To publish the assets run the below command.

Or

This command will copy three files as below:

So there are three files

  1. Currency rates migration
  2. Currency Rate model
  3. config/currency-converter.php

After that, you need to run the migration command to migrate the currency rates table into database as below:

Then you can set the default currency in config file as below:

and other config settings.

After that, you can create a CRUD to save the currency rates into database

Usage:

In Controller include Currency Facade and call as below:

If you want to use a helper's function use below.

If you want to convert amount from one currency to another using Currency Facade, call chain functions as below:

with helper functions you can call as below:

Note: Since this currency converter has cache implemented to avoid database query everytime when currency conversion function will call, so every time when new currency rate will add via CurrencyRate model, the cahce will automatically reset.

However, you can reset that specific cache by runing the below command:

``


All versions of currency-converter with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package amkas/currency-converter contains the following files

Loading the files please wait ....