edit this page Upgrade
Upgrading To 1.0 From 0.3
There was a move to simplify the entire package, it was getting a little too crazy.
Updating Dependencies
Update your composer.json
file to point to torann/currency 1.0.*
.
Preset Currencies
The preset currencies that once shipped with the package inside of the migration file have been moved to an artisan command where you can pick and choose which currencies to support. Whereas the old method installed all of them.
See the manage artisan command for more.
Database Changes
The database columns names were changed see /migrations/2013_11_26_161501_create_currency_table.php
Changes:
title
changed toname
symbol_left
removedsymbol_right
removedcode
changed tocode
decimal_place
removedvalue
changed toexchange_rate
decimal_point
removedthousand_point
removedstatus
changed toactive
Additions:
symbol
: The currency symbolformat
: Contains formatting syntax for the currency
Methods
Many of the methods have changed. Have a look over the basic usage and the methods pages.
Upgrading To 0.3 From 0.2
There was a move to middleware in v0.3 for handling user currency switching. Using the middleware, this fixes Bug 33.
Add Middleware
Append the middleware class to the $middleware
variable within app/Http/Kernel.php
.
protected $middleware = [
\Torann\Currency\Middleware\CurrencyMiddleware::class,
]