Feature: Creating Cart Service, Cart Events, Save For Later functionality, Adding Filament Views for viewing abandoned carts
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Core\Cart\Events;
|
||||
|
||||
use Lunar\Models\Cart;
|
||||
|
||||
class CartCleared
|
||||
{
|
||||
/**
|
||||
* @param array<int, array{id: int, purchasable_type: string, purchasable_id: int, quantity: int, meta: array}> $lines
|
||||
* Snapshot of every line that was in the cart before clearing — Cart::clear()
|
||||
* deletes all rows directly, so nothing here can be fresh CartLine instances.
|
||||
*/
|
||||
public function __construct(
|
||||
public readonly Cart $cart,
|
||||
public readonly array $lines,
|
||||
) {}
|
||||
}
|
||||
Reference in New Issue
Block a user