PHP code example of azi / config

1. Go to this page and download the library: Download azi/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/ */

    

azi / config example snippets


   return [
      'mysql' => [
        'host' => '127.0.0.1',
        'username' => 'root',
        'password' => 'secrete'
      ]
    ];
  

     // will return 127.0.0.1
  $host = Azi\Config::get('database.mysql.host');
  
  // OR
  $db = Azi\Config::get('database.mysql');
  $host = $db->get('host');
  $username = $db->get('username');
  $password = $db->get('password');
  
  

    // will return 127.0.0.1
    $host = config('database.mysql.host');