Replies: 2 comments 2 replies
-
The config is merged with key 'mypackage' by the package maintainer in a service provider and will start with that name as the first key. So you can do `config('mypackage.some-config') . why change that behaviour? |
Beta Was this translation helpful? Give feedback.
0 replies
-
@henzeb I am familiar with the current ability to use a dot ( Also, I don't want to change the existing functionally, instead, I want to have the ability to use |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Laravel Version
10.4.1
PHP Version
8.3
Database Driver & Version
No response
Description
Add the ability to access configurations loaded by a package with scoped naming.
For example, assuming the package
mypackage
, I would be able to access configs defined usingmergeConfigFrom(__DIR__ . '/../config.php', 'mypackage')
withconfig('mypackage::some-config')
.This is already available for the following resources:
componentNamespace('Components', 'nightshade')
is accessible using<x-nightshade::calendar />
.loadTranslationsFrom('./lang', 'courier')
is accessible usingtrans('courier::messages.welcome')
.Route::name('courier::')->group(...)
is accessible usingroutes('courier::welcome')
.loadViewsFrom('./resources/views', 'courier')
is accessible usingview('courier::dashboard')
.Steps To Reproduce
Described above
Beta Was this translation helpful? Give feedback.
All reactions