src/Http/Controllers/ResponseResourceController.php
public function destroy(ResponseRequest $request, Response $response)
    { 
        try {
            $id = $response['question_id']; 
            $question = $this->question->selectquestion($id); 
            $response->delete();
            return redirect('/discussion/'.$question['slug']);


        } catch (Exception $e) {

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

    }
public function destroy(ResponseRequest $request, Response $response)
    { 
        try {
            $id = $response['question_id']; 
            $question = $this->question->selectquestion($id); 
            $response->delete();
            return redirect('/discussion/'.$question['slug']);


        } catch (Exception $e) {

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

    }
public function destroy ( ResponseRequest $ request , Response $ response ) { try { $ id = $ response [ 'question_id' ] ; $ question = $ this -> question -> selectquestion ( $ id ) ; $ response -> delete ( ) ; return redirect ( '/discussion/' . $ question [ 'slug' ] ) ; } catch ( Exception $ e ) { return $ this -> response -> message ( $ e -> getMessage ( ) ) -> code ( 400 ) -> status ( 'error' ) -> url ( guard_url ( 'forum/response/' . $ response -> getRouteKey ( ) ) ) -> redirect ( ) ; } }
Remove the response.

@param Model   $response

@return Response
Remove the response .