Add setting helpers: Introduced a new helper function for retrieving settings values, enhancing the configuration management. Updated composer.json to autoload the new helper file. Updated the app.css and app.js files to the latest versions of Tailwind CSS and Chart.js, respectively, ensuring compatibility and performance improvements.
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
use App\Models\Setting;
|
||||
|
||||
if (!function_exists('setting')) {
|
||||
/**
|
||||
* Get setting value by key
|
||||
*
|
||||
* @param string $key Setting key
|
||||
* @param mixed $default Default value if setting not found
|
||||
* @return mixed
|
||||
*/
|
||||
function setting(string $key, $default = null)
|
||||
{
|
||||
return Setting::get($key, $default);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user