Enviroment variable for php developement

v0.2.0 2019-08-25 07:09 UTC

This package is auto-updated.

Last update: 2024-09-25 18:07:36 UTC


README

Enviroment variable for PHP development

Installation with Composer

composer require thetminnhtun/dotenv

Usage

  • Create .env file and write following code
APP_NAME=ProjectName
APP_ENV=local
APP_URL=http://localhost
  • Create index.php file and write following code
<?php

include 'vendor/autoload.php';

dotenv();

echo env('APP_NAME');
  • install dovenv package by following command
composer require thetminnhtun/dotenv
  • done!