Skip to content

Instantly share code, notes, and snippets.

@techjewel
Created January 25, 2024 14:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save techjewel/743a883a055de6d40a5f70795107af31 to your computer and use it in GitHub Desktop.
Save techjewel/743a883a055de6d40a5f70795107af31 to your computer and use it in GitHub Desktop.
get contact count by tag ids
<?php
/*
* FluentCRM get contact count by tag ids
* Example Usage: fcrmGetContactCountByTagIds([1,2,4]);
* @param array $tagIds
* @return int
*/
function fcrmGetContactCountByTagIds($tagIds = [])
{
return \FluentCrm\App\Models\Subscriber::filterByTags($tagIds)->count();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment