title: How to get the current query DB_HOST value in Laravel
body: <p>In this location:  ..\config\database.php   </p>
  
  <pre><code>   'mysql' =&gt; [
                  'read' =&gt; [
                      'host' =&gt; env('DB_HOST_READ', '127.0.0.2'),
                  ],
                  'write' =&gt; [
                      'host' =&gt; env('DB_HOST_WRITE', '127.0.0.1'),
                  ],
                  'driver' =&gt; 'mysql',
  //                'host' =&gt; env('DB_HOST', '127.0.0.1'),
                  'port' =&gt; env('DB_PORT', '3306'),
                  'database' =&gt; env('DB_DATABASE', 'forge'),
                  'username' =&gt; env('DB_USERNAME', 'forge'),
                  'password' =&gt; env('DB_PASSWORD', ''),
                  'unix_socket' =&gt; env('DB_SOCKET', ''),
                  'charset' =&gt; 'utf8mb4',
                  'collation' =&gt; 'utf8mb4_unicode_ci',
                  'prefix' =&gt; '',
                  'strict' =&gt; false,
                  'engine' =&gt; null,
              ],
  </code></pre>
  
  <p>.env file added:</p>
  
  <pre><code>DB_HOST_READ=127.0.0.2
  DB_HOST_WRITE=127.0.0.1
  </code></pre>
  
  <p>Look the read and write host values. I want to verify the host used for the current running query for both read and write queries.</p>
  
  <p>I am using Laravel 5.5 . So how can I get DB_HOST value for each query?</p>