My listener is like this :
<?php
namespace App\Listeners;
use App\Events\CheckoutOrderEvent;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Contracts\Queue\ShouldQueue;
use Mail;
class CheckoutOrderListener
{
public function __construct()
{
//
}
public function handle(CheckoutOrderEvent $event)
{
// dd($event);
$event->data->notify(New \App\Notifications\CheckoutOrder($event->data));
}
}
If I run dd($event), the result is like this :
When executed, there exist error : Call to a member function notify() on array
How to solve it?