Download the PHP package otifsolutions/currency-layer without Composer

On this page you can find all versions of the php package otifsolutions/currency-layer. 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-layer

Laravel Currency Layer

This Laravel package provides easy integration with Currency Layer Api along with complete list for countries with flag information. It also comes with command to auto sync rates for each currency

Requirements

How to use the Library

Install via Composer (Recommended)

Using Composer

Note :

This package works with database engine myIsam. If you are using mysql database then you have to change database engine to myIsam from config/database.php -> 'connection' => 'mysql' and make this change 'engine' => 'myIsam'

Now, run the migrations

Then, run this command to populate all tables with countries, states, currencies etc data

Now follow the instructions below

Grab the access key by registering on CurrencyLayer, give the key to the app using artisan tinker or by writing this line anywhere in the code, where yourAccessKey (string) is the key you've got from the API

Set the numberOfDays key (positive integer), where this is the data of how many days you want to keep:

Note:

To check what key you have set, try with get method like

and

If you have set the crlKey somewhere in the code, remove that line after first time execution. To reset or re-assign the key, you can use the same line. But, it is recommended to use tinker to set the access key.

After setting all the things, you can now synchronize currency exchange rates data

Hit this command to fetch the exchange rates

Hit this command to remove the exchange rates

Now publish countries flags from package to your project

Note :

Commands rates:delete and rates:get can only be executed when you set the keys crlKey and daysRates

Relationships defined between Models

Model Country has OneToOne relation and Currency, ManyToMany relation with Timezone and OneToMany relation with State.

State Model has OneToMany relation with City

Currency Model has OneToMany relation with CurrencyRate


All versions of currency-layer with dependencies

PHP Build Version
Package Version
Requires ext-curl Version *
ext-json Version *
ext-dom Version *
otifsolutions/curl-handler Version ^1
otifsolutions/laravel-settings Version ^1
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 otifsolutions/currency-layer contains the following files

Loading the files please wait ....