Skip to content

Instantly share code, notes, and snippets.

@ein-stein-chen
Created February 9, 2019 23:30
Show Gist options
  • Select an option

  • Save ein-stein-chen/b274beaaefcf561acc3fa2fbf3efb8c6 to your computer and use it in GitHub Desktop.

Select an option

Save ein-stein-chen/b274beaaefcf561acc3fa2fbf3efb8c6 to your computer and use it in GitHub Desktop.
Allow Monica to export tags -- not good code
/**
* @param Contact $contact
* @param VCard $vcard
*/
private function exportTags(Contact $contact, VCard $vcard)
{
$vCardTag = '';
foreach ($contact->tags()->get() as $tag) {
$vCardTag .= ($tag->name).",";
}
$vcard->add('CATEGORIES',explode(',', rtrim($vCardTag, ',')));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment