app->environment('production')) { URL::forceScheme('https'); } // View Composer untuk semua view (*) View::composer('*', function ($view) { if (Auth::check()) { $user = Auth::user(); $notifikasi = collect(DummyDataService::getNotifikasiForUser($user)); $unreadCount = $notifikasi->where('read', false)->count(); $view->with('notifikasi', $notifikasi); $view->with('unreadNotificationsCount', $unreadCount); } else { $view->with('notifikasi', collect([])); $view->with('unreadNotificationsCount', 0); } }); } }