Exemplo n.º 1
0
 public function deletequery()
 {
     $id = Input::get('queryId');
     $deleteQuestionwillingtohelp = Questionwillingtohelp::where('question_id', '=', $id)->delete();
     $deleteGroupQuestion = Groupquestion::where('question_id', '=', $id)->delete();
     $deleteQuestion = Question::where('id', '=', $id)->delete();
     $deleteKarmafeed = Karmafeed::where('id_type', '=', $id)->whereIn('message_type', array('KarmaQuery', 'OfferHelpTo'))->delete();
     $deleteMykarma = Mykarma::where('entry_id', '=', $id)->whereIn('users_role', array('PostedQuery', 'OfferedHelp'))->delete();
     echo "Question " . $id . " deleted";
 }