/**
  * 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)]);
 }
示例#2
0
 /**
  * Run the request filter.
  *
  * @return void
  */
 public function filter()
 {
     Notifier::storeNotifications();
 }
示例#3
0
 /**
  * Run the request filter.
  *
  * @return void
  */
 public function filter()
 {
     Notifier::fetchNotifications();
 }