public static function pushNotification($data) { $notification = Notification::query()->with('fromUser', 'topic')->where($data)->first(); if (!$notification) { return; } $from_user_name = $notification->fromUser->name; $topic_title = $notification->topic->title; $msg = $from_user_name . ' • ' . $notification->present()->lableUp() . ' • ' . $topic_title; $push_data = array_only($data, ['topic_id', 'from_user_id', 'type']); if ($data['reply_id'] !== 0) { $push_data['reply_id'] = $data['reply_id']; // $push_data['replies_url'] = route('replies.web_view', $data['reply_id']); } //self::jpush($notification->user_id, $msg, $push_data); }