public function addParticipant($eventid, $name, $email, $phone, $orderid)
 {
     $participant = new Participant();
     $participant->eventid = $eventid;
     $participant->name = $name;
     $participant->email = $email;
     $participant->phone = $phone;
     $participant->orderid = $orderid;
     //insert//
     $saved = $participant->save();
     //verify insertion//
     if ($saved) {
         $array = array('success' => true, 'participant' => $participant);
         return json_encode($array);
     } else {
         $array = array('success' => false, 'message' => 'An error occurred');
         return json_encode($array);
     }
 }