victoravelar/laravel-dashboard-exchange-rates-tile
Composer 安装命令:
composer require victoravelar/laravel-dashboard-exchange-rates-tile
包简介
It allows you to display a list of selected currencies and it's exchange rate to a base currency of your choice.
README 文档
README
It allows you to display a list of selected currencies and it's exchange rate to a base currency of your choice.
This tile can be used on the Laravel Dashboard.
Installation
You can install the package via composer:
composer require VictorAvelar/laravel-dashboard-exchange-rates-tile
Usage
Exchange rates tile
Depending on your provider, this tile will show the most recent exchange rate for the symbols listed in your configuration.
In your dashboard view you use the livewire:dashboard-exchange-rates-tile component.
<x-dashboard> <livewire:exchange-rates-tile position="a1" /> </x-dashboard>
Example
Exchange rate converter
The conversion of a certain amount in your base currency to each symbol in your configuration is displayed on this tile.
In your dashboard view you use the livewire:dashboard-exchange-converter-tile component.
<x-dashboard> <livewire:exchange-converter-tile position="a1" /> </x-dashboard>
Example
Fetching exchange rates
In app\Console\Kernel.php you should schedule the Avelar\ExchangeRates\UpdateCurrencyExchangeRatesCommand to run.
// in app/console/Kernel.php protected function schedule(Schedule $schedule) { // ... $schedule->command(Avelar\ExchangeRates\UpdateCurrencyExchangeRatesCommand::class)->everyMinute(); }
Customzing the views
php artisan vendor:publish --provider="Avelar\ExchangeRates\ExchangeRatesTileServiceProvider" --tag="dashboard-exchange-rates-views"
Configuration
// in config/dashboard.php return [ // other settings 'tiles' => [ // other tiles ... 'exchange_rates' => [ /* |-------------------------------------------------------------------------- | Exchange rates provider. |-------------------------------------------------------------------------- | | Value for the exchange rates provider you prefer to use, the tile was | build using exchangerate.host which is free but it is also fully | compatible with fixer.io which has a freemium model. | | Accepted values are: "exchangerates.host" and "fixer.io". | */ 'provider' => 'exchangerate.host', /* |-------------------------------------------------------------------------- | Base currency. |-------------------------------------------------------------------------- | | The currency you want to use as base for the exchange rates display. | | Any currency is accepted as base as long as it is supported by your | exchange rate provider. | */ 'base' => 'EUR', /* |-------------------------------------------------------------------------- | Symbols to track. |-------------------------------------------------------------------------- | | An array of exchange rate(s) symbols you wish to track. | | Example: ['USD', 'JPY', 'MXN'] | */ 'symbols' => ['GBP', 'USD'], /* |-------------------------------------------------------------------------- | Crypto assets to track. |-------------------------------------------------------------------------- | | An array of crypto assets(s) you wish to track. | | The support for this feature depends on the provider you are using and | the crypto exchanges/assets this provider tracks. | | Currently only exchangerates.host is available as crypto provider and | the list of available assets can be found here: | https://api.exchangerate.host/cryptocurrencies | | Example: ['BTC'] | */ 'crypto' => ['BTC'], /* |-------------------------------------------------------------------------- | Fixer.io API key. |-------------------------------------------------------------------------- | | When using fixer.io as provider you need to privide a valid API key | in order to access the API. | */ 'api_key' => env('FIXER_API_KEY', ''), /* |-------------------------------------------------------------------------- | Tile refresh interval (optional). |-------------------------------------------------------------------------- | | How often should the dashboard refresh your tile. | | If none set, it defaults to 60s. | */ 'refresh_interval_in_seconds' => 60, /* |-------------------------------------------------------------------------- | Converter value. |-------------------------------------------------------------------------- | | An amount to track against the specified symbols and crypto assets. | | Example: 500 | | This will display a list in a similar fashion than the one tracking the | exchange rates, the content will refer to the amount in X currency | you will get by converting n amount of the base currency. | */ 'convert_value' => 500, ], ], ];
Testing
composer test
Security
If you discover any security related issues, please email deltatuts@gmail.com instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.
victoravelar/laravel-dashboard-exchange-rates-tile 适用场景与选型建议
victoravelar/laravel-dashboard-exchange-rates-tile 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 74 次下载、GitHub Stars 达 0, 最近一次更新时间为 2022 年 09 月 09 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「laravel」 「exchange-rates」 「laravel-dashboard」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 victoravelar/laravel-dashboard-exchange-rates-tile 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 victoravelar/laravel-dashboard-exchange-rates-tile 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 victoravelar/laravel-dashboard-exchange-rates-tile 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
A PHP API Wrapper to offer a unified programming interface for popular Currency Rate APIs.
Allows you to receive current exchange rates from various sources and convert them.
Currency Converter Class with features of caching and identifying currency from country Code
Laravel SDK package for working with the alfaexchange.io API
Alfabank REST API integration
Used to manage site themes for front and back end Laravel
统计信息
- 总下载量: 74
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 15
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-09-09

