/
home
/
sditechnicalteam
/
www
/
app
/
Listeners
/
File Upload :
llllll
Current File: /home/sditechnicalteam/www/app/Listeners/TicketReplyListener.php
<?php namespace App\Listeners; use App\Events\TicketReplyEvent; use App\Notifications\NewTicketReply; use App\Models\User; use Illuminate\Support\Facades\Notification; class TicketReplyListener { /** * Handle the event. * * @param TicketReplyEvent $event * @return void */ public function handle(TicketReplyEvent $event) { if (!is_null($event->notifyUser)) { Notification::send($event->notifyUser, new NewTicketReply($event->ticketReply)); } else { Notification::send(User::allAdmins($event->ticketReply->ticket->company->id), new NewTicketReply($event->ticketReply)); } } }
Copyright ©2k19 -
Hexid
|
Tex7ure