Snapshot of main at 9f39a6e1e (2026-11-02)

This commit is contained in:
Ronald Huynen committed 2026-11-02 10:41:47 +01:00
commit 6ccf1792d7
2580 files changed
+1040202

No files matched your search

+28
View File
@@ -0,0 +1,28 @@
<?php
if (!function_exists('timebank_config')) {
/**
* Get platform-specific configuration value
*
* This function dynamically loads configuration from the file specified
* in the TIMEBANK_CONFIG environment variable (config app.timebank_config, defaults to 'timebank-default').
*
* @param string $key Configuration key in dot notation (e.g., 'profiles.user.limit_max')
* @param mixed $default Default value if key is not found
* @return mixed
*
* @example
* // Get user profile limit_max from config/{TIMEBANK_CONFIG}.php
* $limitMax = timebank_config('profiles.user.limit_max');
*
* // With a default value
* $limitMax = timebank_config('profiles.user.limit_max', 6000);
*/
function timebank_config($key, $default = null)
{
// Read through config, not env(): env() returns null once the config is cached
$configName = config('app.timebank_config', 'timebank-default');
return config($configName . '.' . $key, $default);
}
}