refactor: replace custom CRM with Monica fork
Some checks failed
Build & Push Monica Image to Gitea Registry / build-and-push (push) Failing after 9s

This commit is contained in:
Kroonk
2026-05-22 16:19:55 +02:00
parent 38cc4c09ca
commit a213a1dba0
2215 changed files with 242567 additions and 6015 deletions

View File

@@ -0,0 +1,28 @@
<?php
namespace App\Helpers;
use Illuminate\Support\Arr;
use Sabre\VObject\Component\VCard;
class VCardHelper
{
/**
* Get country model object from given VCard file.
*
* @param VCard $vCard
* @return string|null
*/
public static function getCountryISOFromSabreVCard(VCard $vCard): ?string
{
$vCardAddress = $vCard->ADR;
if (empty($vCardAddress)) {
return null;
}
$country = Arr::get($vCardAddress->getParts(), '6');
return empty($country) ? null : CountriesHelper::find($country);
}
}