<?php
 namespace Module\PayCenter\Listeners; use Module\PayCenter\Events\OrderPayedEvent; use Illuminate\Support\Facades\Log; class PayListener { public function onOrderPayed(OrderPayedEvent $event) { Log::info('PayListener - onOrderPayed -> ' . json_encode($event)); } public function subscribe($events) { $events->listen( OrderPayedEvent::class, '\Module\PayCenter\Listeners\PayListener@onOrderPayed' ); } }