/
home
/
sditechnicalteam
/
www
/
app
/
Listeners
/
File Upload :
llllll
Current File: /home/sditechnicalteam/www/app/Listeners/NewChatListener.php
<?php namespace App\Listeners; use App\Events\NewChatEvent; use App\Models\User; use App\Notifications\NewChat; use App\Scopes\ActiveScope; use Illuminate\Support\Facades\Notification; class NewChatListener { /** * Handle the event. * * @param NewChatEvent $event * @return void */ public function handle(NewChatEvent $event) { $notifyUser = User::withoutGlobalScope(ActiveScope::class)->findOrFail($event->userChat->user_id); Notification::send($notifyUser, new NewChat($event->userChat)); } }
Copyright ©2k19 -
Hexid
|
Tex7ure