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