1. Go to this page and download the library: Download emargareten/config-php library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?phprequire_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
// Get a value from your configuration
$value = Config::get('key');
// Get a value with a default value if key is not found
$value = Config::get('key', 'default');
// Set a value in your configuration
Config::set('key', 'value');
// Remove a value from your configuration
Config::forget('key');
// Remove all values from your configuration
Config::clear();
// Set multiple values in your configuration
Config::setMany([
'key1' => 'value1',
'key2' => 'value2',
]);
// Reset your configuration to its initial state (rereads the config file)
Config::reset();
// Check if a key exists in your configurationif (Config::has('key')) {
// ...
}
// Get all values from your configuration
$values = Config::all();
config()->get('key'); // or config('key')
config()->set('key', 'value');
// ...
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.