Skip to content

Commit 7ab522a

Browse files
committed
refine config.ensure
1 parent 93a3e9a commit 7ab522a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

configuration.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,13 +89,13 @@ const appName = Config.get('app.name', 'My Supercharge App')
8989

9090

9191
### Ensure Configuration Values
92-
You may need to ensure a configuration value while building an application or community package. For example, a file cache driver requires a caching directory that you need to configure. In such situations, you may use the `Config.ensure` method to require a
92+
You may need to ensure a configuration value while building an application or community package. For example, a file cache requires a configured caching directory. In case the file cache driver doesn’t receive the configuration value for a cache directory, you may want to stop further processing.
93+
94+
You can require a configuration value using the `Config.ensure` method:
9395

9496
```js
9597
import { Config } from '@supercharge/facades'
9698

97-
Config.ensure('cache.location')
99+
Config.ensure('cache.file.directory')
98100
// throws if the configuration for `cache.location` is missing
99101
```
100-
101-

0 commit comments

Comments
 (0)