original_string: public function tagsDelete(Request $request, Response $response)
      {
          if ($check = $this->sentinel->hasPerm('blog_tags.delete', 'dashboard', $this->config['blog-enabled'])) {
              return $check;
          }
  
          $tag = BT::find($request->getParam('tag_id'));
  
          
          if (!$tag) {
              $this->flash('danger', 'Tag doesn\'t exist.');
              return $this->redirect($response, 'admin-blog');
          }
          
          if ($tag->delete()) {
              $this->flash('success', 'Tag has been removed.');
              return $this->redirect($response, 'admin-blog');
          }
  
          $this->flash('danger', 'There was a problem removing the tag.');
          return $this->redirect($response, 'admin-blog');
      }
code: public function tagsDelete(Request $request, Response $response)
      {
          if ($check = $this->sentinel->hasPerm('blog_tags.delete', 'dashboard', $this->config['blog-enabled'])) {
              return $check;
          }
  
          $tag = BT::find($request->getParam('tag_id'));
  
          
          if (!$tag) {
              $this->flash('danger', 'Tag doesn\'t exist.');
              return $this->redirect($response, 'admin-blog');
          }
          
          if ($tag->delete()) {
              $this->flash('success', 'Tag has been removed.');
              return $this->redirect($response, 'admin-blog');
          }
  
          $this->flash('danger', 'There was a problem removing the tag.');
          return $this->redirect($response, 'admin-blog');
      }
code_tokens: public function tagsDelete ( Request $ request , Response $ response ) { if ( $ check = $ this -> sentinel -> hasPerm ( 'blog_tags.delete' , 'dashboard' , $ this -> config [ 'blog-enabled' ] ) ) { return $ check ; } $ tag = BT :: find ( $ request -> getParam ( 'tag_id' ) ) ; if ( ! $ tag ) { $ this -> flash ( 'danger' , 'Tag doesn\'t exist.' ) ; return $ this -> redirect ( $ response , 'admin-blog' ) ; } if ( $ tag -> delete ( ) ) { $ this -> flash ( 'success' , 'Tag has been removed.' ) ; return $ this -> redirect ( $ response , 'admin-blog' ) ; } $ this -> flash ( 'danger' , 'There was a problem removing the tag.' ) ; return $ this -> redirect ( $ response , 'admin-blog' ) ; }
docstring: Delete Blog Tag
docstring_tokens: Delete Blog Tag