Пример #1
0
 public function putreplycomment()
 {
     $inputdetails['comment_id'] = $_GET['comment_id'];
     $inputdetails['replycomment'] = $_GET['replycmt'];
     $curdate = date('Y-m-d h:i:s');
     $inputdetails['createddate'] = $curdate;
     $inputdetails['user_id'] = Auth::user()->ID;
     $participant_id = $_GET['participant_id'];
     $contest_id = $_GET['contest_id'];
     $save = replycommentModel::create($inputdetails);
     if ($save) {
         return Redirect::to("contest_info/" . $contest_id)->with('tab', 'gallery')->with('gallerytype', 'comment')->with('viewcommentforparticipant', $participant_id)->with('Massage', 'Reply Comment added successfully');
     }
 }
 public function replycomments()
 {
     $inputdetails = Input::get();
     $curdate = date('Y-m-d h:i:s');
     $inputdetails['createddate'] = $curdate;
     $validation = Validator::make($inputdetails, replycommentModel::$rules);
     if ($validation->passes()) {
         $save = replycommentModel::create($inputdetails);
         if ($save) {
             $Response = array('success' => '1', 'message' => 'Reply Comments successfully', 'msgcode' => "c161");
             $final = array("response" => $Response);
             return json_encode($final);
         }
     } else {
         $Response = array('success' => '0', 'message' => 'Some Details are missing', 'msgcode' => "c101");
         $final = array("response" => $Response);
         return json_encode($final);
     }
 }