Allow closures as Config default.

This commit is contained in:
Taylor Otwell 2011-07-06 14:37:59 -07:00
parent 57f61dc54c
commit e2973e565d
1 changed files with 1 additions and 1 deletions

View File

@ -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);