New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

ownego/laravel-shopify-currency

Currency converter using Shopify's currencies cdn file
9,542 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,110 54
garmanio/laravel-shopify

Shopify API Wrapper for Laravel

112 0
bceyssens/laravel-shopify

Shopify interaction for Laravel

18 0
eduard9969/blade-polaris-icons

A package to easily make use of Polaris Icons in your Laravel Blade views.

101,665 4
linkthrow/ffmpeg

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

40,825 29

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