37 lines
806 B
PHP
37 lines
806 B
PHP
<?php
|
|
|
|
if (! function_exists('settings')) {
|
|
function settings(string $key, $default = null) {
|
|
return app(\App\Support\SettingsRepository::class)->get($key, $default);
|
|
}
|
|
}
|
|
|
|
if (!function_exists('domain_host')) {
|
|
function domain_host(string $sub = null): string
|
|
{
|
|
$base = env('BASE_DOMAIN', 'example.com');
|
|
return $sub ? "{$sub}.{$base}" : $base;
|
|
}
|
|
}
|
|
|
|
if (!function_exists('ui_host')) {
|
|
function ui_host(): string
|
|
{
|
|
return domain_host(env('UI_SUB', 'ui'));
|
|
}
|
|
}
|
|
|
|
if (!function_exists('webmail_host')) {
|
|
function webmail_host(): string
|
|
{
|
|
return domain_host(env('WEBMAIL_SUB', 'webmail'));
|
|
}
|
|
}
|
|
|
|
if (!function_exists('mta_host')) {
|
|
function mta_host(): string
|
|
{
|
|
return domain_host(env('MTA_SUB', 'mx'));
|
|
}
|
|
}
|