/** * Handle the event. * * @param MessageSentEvent $event * @return void */ public function handle(MessageSentEvent $event) { $notify = new Notify(); $this->message = $event->message; $msg = $this->message->name . ' send you a message'; $link = url('admin/message/read/' . $this->message->id); $img = asset('assets/img/avatar5.png'); $user = '******'; $notify->makeNotification($msg, $link, $user, $img); }
/** * Handle the event. * * @param CommentSentEvent $event * @return void */ public function handle(CommentSentEvent $event) { $notify = new Notify(); $this->comment = $event->comment; $user = $this->comment->diary->user_id; if ($user != Auth::user()->id) { $msg = $this->comment->user->name . ' comment your diary'; $link = url('diary/read/' . $this->comment->diary->id); $img = $this->comment->user->image; $notify->makeNotification($msg, $link, $user, $img); } }
public function index(Notify $nt) { // $noti=Notifications::get(); // return view('notify::view')->with('notify', $noti); return $nt->getName(); }