misaf/vendra-currency
Composer 安装命令:
composer require misaf/vendra-currency
包简介
Multi-currency support system with translatable content and hierarchical currency categories
README 文档
README
Tenant-aware currency management for Vendra applications.
Features
- Currency categories
- Currencies with buy/sell pricing and conversion rate
- Filament resources on the
adminpanel
Requirements
- PHP 8.2+
- Laravel 12
- Filament 5
- Livewire 4
- Pest 4
- Tailwind CSS 4
misaf/vendra-tenantmisaf/vendra-activity-log
Installation
composer require misaf/vendra-currency php artisan vendor:publish --tag=vendra-currency-migrations php artisan migrate
Optional translations publish:
php artisan vendor:publish --tag=vendra-currency-translations
The service provider and Filament plugin are auto-registered.
Usage
Create a currency category:
use Misaf\VendraCurrency\Models\CurrencyCategory; $category = CurrencyCategory::query()->create([ 'name' => 'Fiat', 'description' => 'Government-issued currencies', 'slug' => 'fiat', 'position' => 1, 'status' => true, ]);
Create a currency:
use Misaf\VendraCurrency\Models\Currency; Currency::query()->create([ 'currency_category_id' => $category->id, 'name' => 'US Dollar', 'description' => 'United States Dollar', 'slug' => 'usd', 'iso_code' => 'USD', 'conversion_rate' => 1, 'decimal_place' => 2, 'buy_price' => 100000, 'sell_price' => 99500, 'is_default' => true, 'position' => 1, 'status' => true, ]);
Load currencies with their category:
$currencies = Currency::query() ->with('currencyCategory') ->where('status', true) ->get();
Filament
Resources are available in the Currencies cluster on the admin panel:
- Currency Categories
- Currencies
Testing
composer test
License
MIT. See LICENSE.
统计信息
- 总下载量: 6
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 4
- 依赖项目数: 2
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-01-28