public function delete($candidate_id)
 {
     try {
         $candidate = Candidate::findOrFail($candidate_id);
         $candidate->delete();
         return $this->respondWithArray(['success' => true, 'message' => 'Candidate deleted successfully']);
     } catch (ModelNotFoundException $e) {
         return $this->setStatusCode(404)->respondWithError('Candidate with ID ' . $candidate_id . ' not found', 404);
     }
 }