public function getDelete($id = null)
    {
        // Get comment information
        $comment = Comments::getCommentsRepository()->find($id);

        if ($comment == null)
        {
            // Prepare the error message
            $error = Lang::get('comments.comment.not_found');

            // Redirect to the post management page
            return Redirect::route('posts')->with('error', $error);
        }

        Base::Log('Comment (' . $comment->id . ') was deleted.');

        // Delete the post
        $comment->delete();

        // Prepare the success message
        $success = Lang::get('comments.comment.deleted');

        // Redirect to the post management page
        return Redirect::back()->with('success', $success);
    }
public function getDelete($id = null)
    {
        // Get comment information
        $comment = Comments::getCommentsRepository()->find($id);

        if ($comment == null)
        {
            // Prepare the error message
            $error = Lang::get('comments.comment.not_found');

            // Redirect to the post management page
            return Redirect::route('posts')->with('error', $error);
        }

        Base::Log('Comment (' . $comment->id . ') was deleted.');

        // Delete the post
        $comment->delete();

        // Prepare the success message
        $success = Lang::get('comments.comment.deleted');

        // Redirect to the post management page
        return Redirect::back()->with('success', $success);
    }
public function getDelete ( $ id = null ) { // Get comment information $ comment = Comments :: getCommentsRepository ( ) -> find ( $ id ) ; if ( $ comment == null ) { // Prepare the error message $ error = Lang :: get ( 'comments.comment.not_found' ) ; // Redirect to the post management page return Redirect :: route ( 'posts' ) -> with ( 'error' , $ error ) ; } Base :: Log ( 'Comment (' . $ comment -> id . ') was deleted.' ) ; // Delete the post $ comment -> delete ( ) ; // Prepare the success message $ success = Lang :: get ( 'comments.comment.deleted' ) ; // Redirect to the post management page return Redirect :: back ( ) -> with ( 'success' , $ success ) ; }
Delete the given comment.

@param  int      $id
@return Redirect
Delete the given comment .