PHP code example of grey-dev-0 / laravel-config

1. Go to this page and download the library: Download grey-dev-0/laravel-config library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

grey-dev-0 / laravel-config example snippets


'GreyDev\ConfigExtension\ConfigExtensionProvider'

'GreyDev\ConfigExtension\ConfigExtensionFacade'

GreyDev\ConfigExtension\ConfigExtensionProvider::class

GreyDev\ConfigExtension\ConfigExtensionFacade::class

# To create a new file you can do like the following.
Config::create('myConfigFile', [
 'key1' => 'something',
 'key2' => [
  'deepData' => 'deepValues'
 ],
 'key3' => 123,
 'key4' => true
]);

# To save a value into an existing configuration file.
Config::save('myConfigFile.key4', false);
Config::save('myConfigFile.keyX', 5.2);

 return [
   'key1' => 'something',
   'key2' => [
    'deepData' => 'deepValues'
   ],
   'key3' => 123,
   'key4' => false,
   'keyX' => 5.2
 ];