public static function hasPosts($postType, $categoriesID)
    {
        if(DB::table(categoriesRelationTable($postType))->where('categoryID', $categoriesID)->count()
        ) {
            return true;
        }else{
            return false;
        }
    }
public static function hasPosts($postType, $categoriesID)
    {
        if(DB::table(categoriesRelationTable($postType))->where('categoryID', $categoriesID)->count()
        ) {
            return true;
        }else{
            return false;
        }
    }
public static function hasPosts ( $ postType , $ categoriesID ) { if ( DB :: table ( categoriesRelationTable ( $ postType ) ) -> where ( 'categoryID' , $ categoriesID ) -> count ( ) ) { return true ; } else { return false ; } }
Check if a category has posts.

@param string $postType     slug of post type
@param string $categoriesID selected category ID

@return bool
Check if a category has posts .