mirror of
https://github.com/kevin-DL/LaravelShoppingcart.git
synced 2026-01-23 15:41:24 +00:00
Update BuyableProduct.php
This commit is contained in:
@@ -5,6 +5,7 @@ namespace Gloudemans\Tests\Shoppingcart\Fixtures;
|
|||||||
use Gloudemans\Shoppingcart\Contracts\Buyable;
|
use Gloudemans\Shoppingcart\Contracts\Buyable;
|
||||||
use Illuminate\Database\Eloquent\Model;
|
use Illuminate\Database\Eloquent\Model;
|
||||||
use Money\Money;
|
use Money\Money;
|
||||||
|
use Money\Currency;
|
||||||
|
|
||||||
class BuyableProduct extends Model implements Buyable
|
class BuyableProduct extends Model implements Buyable
|
||||||
{
|
{
|
||||||
@@ -56,7 +57,7 @@ class BuyableProduct extends Model implements Buyable
|
|||||||
*/
|
*/
|
||||||
public function getBuyablePrice(): Money
|
public function getBuyablePrice(): Money
|
||||||
{
|
{
|
||||||
return new Money($this->price, $this->currency);
|
return new Money($this->price, new Currency($this->currency));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user