PHPackages                             phspa/laravel-currencies - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. phspa/laravel-currencies

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

phspa/laravel-currencies
========================

v3.0.1(2y ago)04371CC-BY-SA-4.0PHPPHP &gt;=7.4.0|^8.0

Since Oct 30Pushed 2y agoCompare

[ Source](https://github.com/phpsa/laravel-currencies)[ Packagist](https://packagist.org/packages/phspa/laravel-currencies)[ RSS](/packages/phspa-laravel-currencies/feed)WikiDiscussions master Synced today

READMEChangelog (2)Dependencies (8)Versions (26)Used By (0)

Laravel Currencies
==================

[](#laravel-currencies)

[![Latest Version on Packagist](https://camo.githubusercontent.com/1e6729a3d9330030a56c8bad6b196a6fe8e2078c8081d07ea22abcb1adfb439d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f70687073612f6c61726176656c2d63757272656e636965732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/phpsa/laravel-currencies)[![Build Status](https://camo.githubusercontent.com/7708fd0419c8edd751b988781a639aa87e939814aa1d132a20bb1d3808b384b0/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f70687073612f6c61726176656c2d63757272656e636965732f52756e25323074657374733f6c6162656c3d5465737473)](https://github.com/phpsa/laravel-currencies/actions)[![StyleCI](https://camo.githubusercontent.com/a00d403815b068f0e54aaa9141063f219497c0fad52ae0772fda8b8a7d14c0e8/68747470733a2f2f7374796c6563692e696f2f7265706f732f3130383834363034382f736869656c643f6272616e63683d6d6173746572)](https://styleci.io/repos/108846048)

This package provides a convenient and powerful way of interacting with currencies and amounts in Laravel.

This package was originally from:

Install
-------

[](#install)

You can install this package via composer:

```
composer require phpsa/laravel-currencies
```

After installation you mus publish and run migrations to create the `currencies` table

```
php artisan vendor:publish --provider="Phpsa\LaravelCurrencies\CurrenciesServiceProvider"
php artisan migrate
```

Setup
-----

[](#setup)

### Recommended: Seed currencies

[](#recommended-seed-currencies)

This package provides a eloquent 'Currency' model out of the box that fetches available currencies from your database.

Often you would want to seed these currencies from your code in order to normalize them across environments. This can easily be achieved with the [Laravel Production Seeding](https://github.com/makeabledk/laravel-production-seeding) package.

Create the following seeder and let it run on each deployment:

```
