public static function hasPosts($tagID, $postTypeSlug = '')
    {
        $postTypeSlug($postTypeSlug ? $postTypeSlug : PostType::getSlug());
        $queryObject = DB::table(tagsRelationTable($postTypeSlug))->where('tagID', $tagID);

        if($queryObject->count() > 0) {
            return true;
        }

        return false;
    }
public static function hasPosts($tagID, $postTypeSlug = '')
    {
        $postTypeSlug($postTypeSlug ? $postTypeSlug : PostType::getSlug());
        $queryObject = DB::table(tagsRelationTable($postTypeSlug))->where('tagID', $tagID);

        if($queryObject->count() > 0) {
            return true;
        }

        return false;
    }
public static function hasPosts ( $ tagID , $ postTypeSlug = '' ) { $ postTypeSlug ( $ postTypeSlug ? $ postTypeSlug : PostType :: getSlug ( ) ) ; $ queryObject = DB :: table ( tagsRelationTable ( $ postTypeSlug ) ) -> where ( 'tagID' , $ tagID ) ; if ( $ queryObject -> count ( ) > 0 ) { return true ; } return false ; }
Check if there is any post related to a tag.

@param  int    $tagID        ID of tag
@param  string $postTypeSlug Slug of post type
@return boolean Returns true if there is any post
Check if there is any post related to a tag .