Allow closures as Config default.
This commit is contained in:
@@ -44,7 +44,7 @@ class Config {
|
|||||||
// Verify that the configuration file actually exists.
|
// Verify that the configuration file actually exists.
|
||||||
if ( ! array_key_exists($file, static::$items))
|
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);
|
return Arr::get(static::$items[$file], $key, $default);
|
||||||
|
|||||||
Reference in New Issue
Block a user