Commit e2973e56 authored by Taylor Otwell's avatar Taylor Otwell

Allow closures as Config default.

parent 57f61dc5
......@@ -44,7 +44,7 @@ class Config {
// 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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment