/** * Display a listing of the resource. * * @return Response */ public function index(Request $request) { $notifications = Notification::visible()->recents(); $notifications = $this->filterNotificationsByDateRange($request, $notifications)->paginate(20); $currency = setting('currency'); return view_backend('notification.index', compact('notifications', 'currency')); }
/** * Display widget. * * @return Response */ public function run() { return view('widget_backend_zedx_latestnotifications::index', ['config' => $this->config, 'currency' => setting('currency'), 'notifications' => Notification::visible()->recents()->limit(6)->get()]); }