Set timezone and date from setup and settings

This commit is contained in:
Joseph Cohen
2015-01-07 13:54:28 -06:00
parent 135badcecf
commit d51811d2b1
13 changed files with 286 additions and 17 deletions
+30
View File
@@ -1,5 +1,6 @@
<?php
use Illuminate\Support\Facades\Config;
use Illuminate\Support\Facades\Request;
if (!function_exists('elixir')) {
@@ -26,6 +27,35 @@ if (!function_exists('elixir')) {
}
}
if (!function_exists('config')) {
/**
* Get / set the specified configuration value.
*
* If an array is passed as the key, we will assume you want to set an array of values.
*
* @param array|string $key
* @param mixed $default
*
* @return mixed
*/
function config($key = null, $default = null)
{
if (is_null($key)) {
return Config::getItems();
}
if (is_array($key)) {
foreach ($key as $innerKey => $innerValue) {
Config::set($innerKey, $innerValue);
}
return;
}
return Config::get($key, $default);
}
}
if (!function_exists('set_active')) {
/**