Your IP : 216.73.216.93


Current Path : /home/users/unlimited/www/learnoid.codeskitter.site/app/Listeners/
Upload File :
Current File : /home/users/unlimited/www/learnoid.codeskitter.site/app/Listeners/CustomNotifyListener.php

<?php

namespace App\Listeners;

use App\Events\CustomNotifyEvent;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Queue\InteractsWithQueue;
use App\Services\NotificationService;

class CustomNotifyListener
{
    /**
     * Create the event listener.
     */
    public function __construct()
    {
        //
    }

    /**
     * Handle the event.
     */
    public function handle(CustomNotifyEvent $event): void
    {
        try {
            $notificationService = new NotificationService;
            $notificationService->sends($event->tokens, $event->title, $event->message);
        } catch (\Throwable $th) {
            throw $th;
        }
    }
}