Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds a new feature called the config helper.
This config helper allows you to fetch configuration values from your application using dot notation rather than importing and fetching information.
To use this helper you will need to import it like so:
and then use it in a controller to fetch any values from your config. Take this example where you want to check if your application is in debug mode:
Notice this is case insensitive. It will look for both
config.application.DEBUG
as well as the lowercase version.but whats even cooler is we can actually go an unlimited amount of layers deep into a dictionary:
lets say we have a config like this:
We can also set a default value if none exists: