revamp notification system

This commit is contained in:
Jagad R R
2025-01-19 15:22:17 +07:00
parent d1085d4b30
commit 974cc4df50
2 changed files with 24 additions and 2 deletions
@@ -111,7 +111,10 @@ class DashboardController extends Controller
->where('is_read', 0);
// Ambil data dan kembalikan sebagai JSON
return response()->json($notifications->limit(6)->get());
return response()->json([
'count' => $notifications->count(),
'data' => $notifications->take(7)->get(),
]);
}
public function mark_read()