PHP code example of mtolhuys / laravel-env-scanner

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

    

mtolhuys / laravel-env-scanner example snippets


(new LaravelEnvScanner(__DIR__))->scan()->results;

// Or

$this->scanner = new LaravelEnvScanner(__DIR__);
$this->scanner->scan();
$this->scanner->results;

// Example results
[
  "locations" => 1
  "defined" => 1
  "undefined" => 0
  "depending_on_default" => 0,
  "columns" => [
    0 => [
      "location" => "laravel-app/config/database.php:36"
      "defined" => "DB_HOST"
      "depending_on_default" => "-"
      "undefined" => "-"
    ]
  ]
]