You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
601 B
31 lines
601 B
<?php
|
|
|
|
namespace App\Listeners;
|
|
|
|
use App\Events\OrderShipped;
|
|
|
|
class SendShipmentNotification
|
|
{
|
|
/**
|
|
* 创建事件监听器
|
|
*
|
|
* @return void
|
|
*/
|
|
public function __construct()
|
|
{
|
|
\Log::info('----SendShipmentNotification Listeners Init----');
|
|
}
|
|
|
|
/**
|
|
* 处理事件
|
|
*
|
|
* @param OrderShipped $event
|
|
* @return void
|
|
*/
|
|
public function handle(OrderShipped $event)
|
|
{
|
|
// 使用 $event->order 发访问订单
|
|
\Log::info('----SendShipmentNotification Listeners handle----');
|
|
\Log::info('order_id:' . $event->order_id);
|
|
}
|
|
}
|