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');
    }
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');
    }
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' ) ; }
Delete Blog Tag
Delete Blog Tag