exchange/app/helpers.php

22 lines
415 B
PHP

<?php
if (!function_exists('settings')) {
function settings($key = null, $default = null)
{
if ($key === null) {
return app(App\Models\Setting::class);
}
return app(App\Models\Setting::class)->get($key, $default);
}
}
function translations($json)
{
if (!file_exists($json)) {
return [];
}
return json_decode(file_get_contents($json), true);
}