/**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     if (Request::ajax() && Route::is('notifier.index') || !Request::ajax()) {
         Notifier::expireDisplayedNotifications();
     }
     $notifications = Notifier::getDisplayNotifications();
     if (Request::ajax() && Route::is('notifier.index') || !Request::ajax()) {
         Notifier::displayNotifications($notifications);
     }
     return Response::json(['notifications' => Notifier::toArray($notifications)]);
 }
Esempio n. 2
0
 /**
  * Run the request filter.
  *
  * @return void
  */
 public function filter()
 {
     Notifier::storeNotifications();
 }
Esempio n. 3
0
 /**
  * Run the request filter.
  *
  * @return void
  */
 public function filter()
 {
     Notifier::fetchNotifications();
 }