json( $this->notificationService->listForUser($request->user()), ); } public function markAsRead(Request $request, Notification $notification): JsonResponse { $this->notificationService->markAsRead($notification, $request->user()); return response()->json(['success' => true]); } public function markAllAsRead(Request $request): JsonResponse { $this->notificationService->markAllAsRead($request->user()); return response()->json(['success' => true]); } public function destroy(Request $request, Notification $notification): JsonResponse { $this->notificationService->delete($notification, $request->user()); return response()->json(['success' => true]); } public function destroyAll(Request $request): JsonResponse { $this->notificationService->deleteAll($request->user()); return response()->json(['success' => true]); } }