23 lines
685 B
PHP
23 lines
685 B
PHP
<?php
|
|
|
|
namespace Modules\Core\Customer\Events;
|
|
|
|
use Illuminate\Contracts\Auth\Authenticatable;
|
|
use Lunar\Models\Address;
|
|
|
|
/**
|
|
* Dispatched by Modules\Core\Customer\Services\CustomerAccountService::
|
|
* createAddress(). $causer is carried explicitly (unlike e.g.
|
|
* Modules\Core\Payment\Events\PaymentMethodCreated, which is always
|
|
* staff-caused implicitly) because this write happens on the `web`
|
|
* guard, not `staff` — a listener logging this needs to know who to
|
|
* attribute it to without guessing a guard.
|
|
*/
|
|
class CustomerAddressCreated
|
|
{
|
|
public function __construct(
|
|
public readonly Address $address,
|
|
public readonly Authenticatable $causer,
|
|
) {}
|
|
}
|