mirror of
https://github.com/kevin-DL/LaravelShoppingcart.git
synced 2026-01-11 18:54:33 +00:00
Update CartItemModel.php
This commit is contained in:
@@ -88,7 +88,7 @@ class CartItemModel extends Model
|
||||
public function discount(): Attribute
|
||||
{
|
||||
return new Attribute(
|
||||
get: fn ($value, $attributes): Money {
|
||||
get: function ($value, $attributes): Money {
|
||||
if (! $attributes['discount_fixed']) {
|
||||
return $attribute['price_all']->subtract($attributes['discount_fixed'])
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user