Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[5.5] Let config get many keys at once. #19770

Merged
merged 2 commits into from
Jun 26, 2017
Merged

[5.5] Let config get many keys at once. #19770

merged 2 commits into from
Jun 26, 2017

Conversation

lucasmichot
Copy link
Contributor

Let config get many keys at once so that $values = Config::getMany(['foo', 'bar.baz']); is now possible.

A default value can also be set for each items to retrieve:
$values = Config::getMany(['foo' => 'default_value', 'bar.baz' => 123]);


If Config::get is called with $key as an array, Config::getMany will be used.

@taylorotwell
Copy link
Member

I don't understand why x.y returns an array, why does it not just return the y value like it would when using Config::get('x.y.')

@lucasmichot
Copy link
Contributor Author

You're totally right @taylorotwell , updated in f4f6a70

@taylorotwell taylorotwell merged commit 7255de3 into laravel:master Jun 26, 2017
@lucasmichot lucasmichot deleted the feature/master/config-get-many branch June 26, 2017 13:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants