Allow closures as Config default.
This commit is contained in:
parent
57f61dc54c
commit
e2973e565d
|
@ -44,7 +44,7 @@ public static function get($key, $default = null)
|
|||
// Verify that the configuration file actually exists.
|
||||
if ( ! array_key_exists($file, static::$items))
|
||||
{
|
||||
return $default;
|
||||
return is_callable($default) ? call_user_func($default) : $default;
|
||||
}
|
||||
|
||||
return Arr::get(static::$items[$file], $key, $default);
|
||||
|
|
Loading…
Reference in New Issue