has('api_token')) { $notifications = [ ['text' => 'Kegiatan sudah ditinjau super admin', 'is_read' => false], ['text' => 'Aktivitas berhasil disimpan', 'is_read' => true], ['text' => 'Perubahan data tersimpan', 'is_read' => true], ]; $unreadCount = collect($notifications)->where('is_read', false)->count(); $view->with(compact('notifications', 'unreadCount')); } }); } }