Files
isaaccladandCursor 1e00c31b8b
Deploy Ladill Care / deploy (push) Successful in 1m2s
Give each specialty module a distinct Heroicon-style icon.
Icon names live on the specialty catalog; SVG paths resolve through a shared map and render in sidebar, dashboard, settings, and the specialty shell.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-18 18:30:14 +00:00

64 lines
2.1 KiB
PHP

<?php
use Illuminate\Support\Facades\Config;
if (! function_exists('ladill_platform_url')) {
/** Absolute URL on the platform root (ladill.com). */
function ladill_platform_url(string $path = '/'): string
{
return 'https://'.Config::get('app.platform_domain', 'ladill.com').'/'.ltrim($path, '/');
}
}
if (! function_exists('ladill_account_url')) {
/** Absolute URL on the unified account portal (account.ladill.com). */
function ladill_account_url(string $path = '/'): string
{
return 'https://'.Config::get('app.account_domain', 'account.ladill.com').'/'.ltrim($path, '/');
}
}
if (! function_exists('ladill_home_url')) {
/** Absolute URL on the signed-in product hub (home.ladill.com). */
function ladill_home_url(string $path = '/'): string
{
$platform = (string) Config::get('app.platform_domain', 'ladill.com');
return 'https://home.'.$platform.'/'.ltrim($path, '/');
}
}
if (! function_exists('ladill_auth_url')) {
/** Absolute URL on the identity provider (auth.ladill.com). */
function ladill_auth_url(string $path = '/'): string
{
return 'https://'.Config::get('app.auth_domain', 'auth.ladill.com').'/'.ltrim($path, '/');
}
}
if (! function_exists('care_money')) {
/** Format integer minor units as a human currency string (e.g. 12500 → GHS 125.00). */
function care_money(?int $minor, ?string $currency = null): string
{
$currency = $currency ?: config('care.billing.currency', 'GHS');
return $currency.' '.number_format(((int) $minor) / 100, 2);
}
}
if (! function_exists('care_specialty_icon_path')) {
/** Inline SVG path markup for a specialty module key (Heroicons-style outline). */
function care_specialty_icon_path(string $moduleKey): string
{
return app(\App\Services\Care\SpecialtyModuleService::class)->iconSvgPath($moduleKey);
}
}
if (! function_exists('crm_money')) {
/** @deprecated Use care_money() */
function crm_money(?int $minor, ?string $currency = null): string
{
return care_money($minor, $currency);
}
}