public static function isNotified($from_user_id, $user_id, $topic_id, $type) { $notifys = Notification::fromwhom($from_user_id)->toWhom($user_id)->atTopic($topic_id)->withType($type)->get(); return $notifys->count(); }