Releases: whitecube/laravel-prices
v1.4.0
Full Changelog: v1.3.0...v1.4.0
v1.3.0 - Laravel 11
What's Changed
- Update composer.json for Laravel 11 by @theokbokki in #7
New Contributors
- @theokbokki made their first contribution in #7
Full Changelog: v1.2.0...v1.3.0
v1.2.0 - Added currentForType scope
New features:
- Added a new scope on the Price model:
currentForType
. Filters prices based on type and activated_at values. Usage:
$products->prices()->currentForType('selling')->first();
v1.1.1 - Fix for price model instantiation with minor value of 0
Previously, price models instantiated with a minor value of 0 would set the amount
property to null
instead of 0
. This has now been corrected.
Allow custom models in config
This release allows you to use your own model via a key in the config (see #5)
Updated dependencies & added new PriceStatus enum
Updated the php-prices dependency to use the latest version. This gives the ability to create prices with Brick\Money\RationalNumber
instances.
Additionally, a breaking change was made. The status
getter on Whitecube\LaravelPrices\Models\Price
model now returns an enum instead of a string.
Laravel 10
v0.0.7 Allow Laravel 10
v0.0.6
Fixed error on Laravel 9 following the introduction of this change: laravel/framework#41257
v0.0.5
Fixed effectiveAt scope not doing an inclusive comparison on the given timestamp
v0.0.4
Added ability to easily override the default price type with the getDefaultPriceType
method