mirror of
https://github.com/kevin-DL/LaravelShoppingcart.git
synced 2026-01-18 21:45:06 +00:00
Update CanBeBought.php
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
namespace Gloudemans\Shoppingcart;
|
||||
|
||||
use Money\Money;
|
||||
use Money\Currency;
|
||||
|
||||
trait CanBeBought
|
||||
{
|
||||
@@ -38,7 +39,7 @@ trait CanBeBought
|
||||
public function getBuyablePrice(): Money
|
||||
{
|
||||
if (($price = $this->getAttribute('price')) && ($currency = $this->getAttribute('currency'))) {
|
||||
return new Money($price, $currency);
|
||||
return new Money($price, new Currency($currency));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user