Download the PHP package pk305/cbk-forex without Composer

On this page you can find all versions of the php package pk305/cbk-forex. 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 cbk-forex

CBK Forex — Laravel Package

A Laravel package that fetches Central Bank of Kenya (CBK) foreign exchange rates daily and stores them in your database, with a clean API for querying rates by date, currency, or history.


Features


Requirements

Dependency Version
PHP ^8.1
Laravel 10, 11, or 12

Installation

Publish the config (optional)

Run the migration


Scheduling (Daily Auto-Fetch)

The package automatically registers a daily scheduled command. All you need is a working Laravel scheduler. If you haven't set it up yet, add this single cron entry to your server:

By default the fetch runs at 14:00 (2 PM) EAT — after CBK typically publishes rates. Change the time in your .env:


Manual Fetch (Artisan)


Environment Variables


Usage

Using the Facade

Using the Eloquent Model Directly


REST API (Optional)

If you want to expose rates over HTTP, register these routes in your routes/api.php:

Example Responses

GET /api/cbk-forex/rates

GET /api/cbk-forex/rates/currency/USD?days=7


Supported Currencies

CBK Label ISO Code Name
US DOLLAR USD US Dollar
STG POUND GBP Sterling Pound
EURO EUR Euro
S FRANC CHF Swiss Franc
AUSTRALIAN $ AUD Australian Dollar
CAN $ CAD Canadian Dollar
HONGKONG DOLLAR HKD Hong Kong Dollar
SINGAPORE DOLLAR SGD Singapore Dollar
CHINESE YUAN CNY Chinese Yuan
JPY (100) JPY Japanese Yen (per 100)
IND RUPEE INR Indian Rupee
DAN KRONER DKK Danish Krone
NOR KRONER NOK Norwegian Krone
SW KRONER SEK Swedish Krona
SA RAND ZAR South African Rand
SAUDI RIYAL SAR Saudi Riyal
AE DIRHAM AED UAE Dirham
KES / RWF RWF Rwandan Franc
KES / BIF BIF Burundian Franc
KES / TSHS TZS Tanzanian Shilling
KES / USHS UGX Ugandan Shilling

Testing


License

MIT


All versions of cbk-forex with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
illuminate/support Version ^10.0|^11.0|^12.0|^13.0
illuminate/console Version ^10.0|^11.0|^12.0|^13.0
illuminate/database Version ^10.0|^11.0|^12.0|^13.0
illuminate/http Version ^10.0|^11.0|^12.0|^13.0
guzzlehttp/guzzle Version ^7.0
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 pk305/cbk-forex contains the following files

Loading the files please wait ...