public static function hasPosts($postTypeSlug)
    {
        $getPostType = self::findBySlug($postTypeSlug);
        if($getPostType) {
            if(DB::table($getPostType['slug'])->count() > 0) {
                return true;
            }
        }
        return false;
    }
public static function hasPosts($postTypeSlug)
    {
        $getPostType = self::findBySlug($postTypeSlug);
        if($getPostType) {
            if(DB::table($getPostType['slug'])->count() > 0) {
                return true;
            }
        }
        return false;
    }
public static function hasPosts ( $ postTypeSlug ) { $ getPostType = self :: findBySlug ( $ postTypeSlug ) ; if ( $ getPostType ) { if ( DB :: table ( $ getPostType [ 'slug' ] ) -> count ( ) > 0 ) { return true ; } } return false ; }
Check if a post type has posts.

@param  string $postTypeSlug The name of the post type. ex. service
@return boolean Returns true if there is any post
Check if a post type has posts .