1. Go to this page and download the library: Download boomdraw/laravel-dotenv 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/ */
boomdraw / laravel-dotenv example snippets
use Dotenv;
//or
use Boomdraw\Dotenv\Facades\Dotenv;
//or
use Boomdraw\Dotenv\Contracts\DotenvContract;
class Controller
{
/**
* @var \Boomdraw\Dotenv\Repositories\DotenvRepository
*/
protected $dotenv;
public function __construct(DotenvContract $dotenv)
{
$this->dotenv = $dotenv;
}
}