public function destroy(TagRequest $request, Tag $tag)
    {
        try {

            $tag->delete();
            return $this->response->message(trans('messages.success.deleted', ['Module' => trans('blog::tag.name')]))
                ->code(202)
                ->status('success')
                ->url(guard_url('blog/tag/0'))
                ->redirect();

        } catch (Exception $e) {

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

    }
public function destroy(TagRequest $request, Tag $tag)
    {
        try {

            $tag->delete();
            return $this->response->message(trans('messages.success.deleted', ['Module' => trans('blog::tag.name')]))
                ->code(202)
                ->status('success')
                ->url(guard_url('blog/tag/0'))
                ->redirect();

        } catch (Exception $e) {

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

    }
public function destroy ( TagRequest $ request , Tag $ tag ) { try { $ tag -> delete ( ) ; return $ this -> response -> message ( trans ( 'messages.success.deleted' , [ 'Module' => trans ( 'blog::tag.name' ) ] ) ) -> code ( 202 ) -> status ( 'success' ) -> url ( guard_url ( 'blog/tag/0' ) ) -> redirect ( ) ; } catch ( Exception $ e ) { return $ this -> response -> message ( $ e -> getMessage ( ) ) -> code ( 400 ) -> status ( 'error' ) -> url ( guard_url ( 'blog/tag/' . $ tag -> getRouteKey ( ) ) ) -> redirect ( ) ; } }
Remove the tag.

@param Model   $tag

@return Response
Remove the tag .