notification = new Notification(); } public function delete($id) { if (!$id || !is_numeric($id)) { return Response::json(['status' => 'error', 'message' => 'Invalid notification ID']); } $result = $this->notification->deleteNotification($id); if ($result) { return Response::json(['status' => 'success', 'message' => 'Notification deleted']); } return Response::json(['status' => 'error', 'message' => 'Failed to delete']); } }