count(); } catch (\Throwable) { $alertCount = 0; } $view->with('alertCount', $alertCount); }); } }