Add a setting helper and fix email name. Closes #2410

This commit is contained in:
James Brooks
2017-03-18 08:50:18 +00:00
parent 65f438202c
commit faace4bfb6
2 changed files with 18 additions and 3 deletions
+15
View File
@@ -9,10 +9,25 @@
* file that was distributed with this source code.
*/
use CachetHQ\Cachet\Settings\Repository;
use Illuminate\Support\Facades\Config;
use Illuminate\Support\Facades\Request;
use Jenssegers\Date\Date;
if (!function_exists('setting')) {
/**
* Get a setting, or the default value.
*
* @param string $name
* @param mixed $default
*
* @return mixed
*/
function setting($name, $default = null) {
return app(Repository::class)->get($name, $default);
}
}
if (!function_exists('set_active')) {
/**
* Set active class if request is in path.