The Illuminate\Support\Facades\Config facade provides a simple way to work with configuration values in Laravel. It allows you to easily retrieve and modify configuration items for your application.
Example 1: To retrieve a configuration value using the 'has' method:
if (Config::has('app.timezone')) {
//
}
This code checks if the app.timezone value is set in the configuration.
Example 2: To set a configuration value using the 'set' method:
Config::set('app.debug', true);
This code sets the app.debug value to true in the configuration.
Package library: Laravel Framework.
PHP Illuminate\Support\Facades Config::has - 16 examples found. These are the top rated real world PHP examples of Illuminate\Support\Facades\Config::has extracted from open source projects. You can rate examples to help us improve the quality of examples.