ownego/laravel-shopify-currency

Currency converter using Shopify's currencies cdn file
8,739 2
Install
composer require ownego/laravel-shopify-currency
Latest Version:1.0.0
PHP:>=5.5.1
Laravel:5 – 8
License:MIT
Last Updated:Dec 13, 2021
Links: GitHub  ·  Packagist
Maintainer: vntrungld

Introduction

This package created for convert between 2 currencies by using currencies.js file provided by Shopify.

Installation

  1. Install package

    composer require ownego/laravel-shopify-currency
    
  2. Optional: add the service provider

    'providers' => [
       // ...
       Ownego\LaravelShopifyCurrency\LaravelShopifyCurrencyServiceProvider::class,
    ],
    
  3. Optional: publish config

    php artisan vendor:publish --provider=Ownego\LaravelShopifyCurrency\LaravelShopifyCurrencyServiceProvider
    
  4. Optional: add facade

    'alias' => [
       // ...
       'ShopifyCurrency' => Ownego\LaravelShopifyCurrency\Facades\ShopifyCurrency::class,
    ],
    

Usage

  1. Convert
    use Ownego\LaravelShopifyCurrency\Facades\ShopifyCurrency;
    
    $result = ShopifyCurrency::convert(100, 'eur', 'usd');
    
  2. Get rate
    use Ownego\LaravelShopifyCurrency\Facades\ShopifyCurrency;
    
    $result = ShopifyCurrency::rate('eur', 'usd');
    

Command

If you want to manually update currencies from cache, then run:

php artisan shopify-currency:cache

Related Packages

bnmetrics/laravel-shopify-api

Shopify API wrapper for laravel

46,106 54
linkthrow/ffmpeg

A laravel audio and video conversion, thumbnail generator and metadata editor pa...

40,762 29
anam/phantommagick

PhantomMagick provides a simple API to ease the process of converting HTML to PD...

470,344 160
dan/shopify-api

Shopify API for PHP

8,708 21
simonellensohn/laravel-schema-converter

Converts eloquent models to a specified schema

529 0

Version History

Version Released PHP Laravel License
1.0.0 >=5.5.1 >=5.1 MIT
0.5 >=5.5.1 >=5.1 MIT
0.4 >=5.5.1 >=5.1 MIT
0.3 >=5.5.1 >=5.1 MIT
0.2 >=5.5.1 >=5.1 MIT