original_string: 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);
      }
code: 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);
      }
code_tokens: 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 ) ; }
docstring: Delete the given comment.
  
  @param  int      $id
  @return Redirect
docstring_tokens: Delete the given comment .