19 lines
519 B
PHP
19 lines
519 B
PHP
<?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,
|
|
) {}
|
|
}
|