text: var notificationsWrapper = $('.dropdown-notification');
  var notificationsToggle = notificationsWrapper.find('a[data-toggle]');
  var notificationsCountElem = notificationsToggle.find('span[data-count]');
  var notificationsCount = parseInt(notificationsCountElem.data('count'));
  var notifications = notificationsWrapper.find('li.scrollable-container');
  
  var postsWrapper = $('.post-count');
  var postsCountElem = postsWrapper.find('h1.title');
  var posts = postsWrapper.find('p.content');
  // Subscribe to the channel we specified in our Laravel Event
  var channel = pusher.subscribe('new-notification');
  // Bind a function to a Event (the full Laravel class)
  channel.bind('App\\Events\\NewNotification', function (data) {
      var existingNotifications = notifications.html();
      var newNotificationHtml = `<a href="`+data.post_id+`"><div class="media-body"><h6 class="media-heading text-right">` + data.user_id + `</h6> <p class="notification-text font-small-3 text-muted text-right">` + data.comment + `</p><small style="direction: ltr;"><p class="media-meta text-muted text-right" style="direction: ltr;">` + data.date + data.time + `</p> </small></div></div></a>`;
      notifications.html(newNotificationHtml + existingNotifications);
      notificationsCount += 1;
      notificationsCountElem.attr('data-count', notificationsCount);
      notificationsWrapper.find('.notif-count').text(notificationsCount);
      notificationsWrapper.show();
  });
  
  channel.bind('App\\Events\\NewNotification', function (data) {
      var existingNotifications = posts.html();
      var newNotificationHtml = `<a href="`+data.post_id+`"><div class="media-body"><p class="notification-text font-small-3 text-muted text-right">` + data.comment + `</p></div></a>`;
      posts.html(newNotificationHtml + existingNotifications);
      posts.show();
  });
  
  
  