/** * Remove the specified MutipleQuestion from storage. * * @param int $id * * @return Response */ public function destroy($id) { $mutipleQuestion = $this->mutipleQuestionRepository->find($id); if (empty($mutipleQuestion)) { Flash::error('MutipleQuestion not found'); return redirect(route('mutipleQuestions.index')); } $this->mutipleQuestionRepository->delete($id); Flash::success('MutipleQuestion deleted successfully.'); return redirect(route('mutipleQuestions.index')); }
/** * Remove the specified MutipleQuestion from storage. * DELETE /mutipleQuestions/{id} * * @param int $id * * @return Response */ public function destroy($id) { $this->mutipleQuestionRepository->apiDeleteOrFail($id); return $this->sendResponse($id, "MutipleQuestion deleted successfully"); }