0
0

更新代码

This commit is contained in:
2020-08-04 10:09:42 +08:00
parent 6118b5b63b
commit c2ac5d964e
478 changed files with 34410 additions and 0 deletions

View File

@@ -0,0 +1,30 @@
<?php
namespace App\Listeners;
use App\Jobs\ClosedOrder;
// use App\Notifications\OrderCreatedNotify;
use Illuminate\Contracts\Queue\ShouldQueue;
use RuLong\Order\Events\OrderCreated as OrderCreatedEvent;
class OrderCreatedListener implements ShouldQueue
{
public $queue = 'LISTENER';
/**
* Handle the event.
*
* @param OrderCreatedEvent $event
* @return void
*/
public function handle(OrderCreatedEvent $event)
{
// \Notification::send($event->order->user, new OrderCreatedNotify($event->order));
if (in_array($event->order->type, ['order'])) {
ClosedOrder::dispatch($event->order);
}
}
}