src/Http/Controllers/QuestionResourceController.php
public function destroy(QuestionRequest $request, Question $question)
    { 
        try {

            $question->delete();
            return $this->response->message(trans('messages.success.deleted', ['Module' => trans('forum::question.name')]))
                ->code(202)
                ->status('success')
                ->url(guard_url('forum/question'))
                ->redirect();

        } catch (Exception $e) {

            return $this->response->message($e->getMessage())
                ->code(400)
                ->status('error')
                ->url(guard_url('forum/question/' . $question->getRouteKey()))
                ->redirect();
        }

    }
public function destroy(QuestionRequest $request, Question $question)
    { 
        try {

            $question->delete();
            return $this->response->message(trans('messages.success.deleted', ['Module' => trans('forum::question.name')]))
                ->code(202)
                ->status('success')
                ->url(guard_url('forum/question'))
                ->redirect();

        } catch (Exception $e) {

            return $this->response->message($e->getMessage())
                ->code(400)
                ->status('error')
                ->url(guard_url('forum/question/' . $question->getRouteKey()))
                ->redirect();
        }

    }
public function destroy ( QuestionRequest $ request , Question $ question ) { try { $ question -> delete ( ) ; return $ this -> response -> message ( trans ( 'messages.success.deleted' , [ 'Module' => trans ( 'forum::question.name' ) ] ) ) -> code ( 202 ) -> status ( 'success' ) -> url ( guard_url ( 'forum/question' ) ) -> redirect ( ) ; } catch ( Exception $ e ) { return $ this -> response -> message ( $ e -> getMessage ( ) ) -> code ( 400 ) -> status ( 'error' ) -> url ( guard_url ( 'forum/question/' . $ question -> getRouteKey ( ) ) ) -> redirect ( ) ; } }
Remove the question.

@param Model   $question

@return Response
Remove the question .