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