2017 © Pedro Peláez
 

yii2-extension yii2-dotenv

PHP DotEnv for Yii2 framework

image

yiithings/yii2-dotenv

PHP DotEnv for Yii2 framework

  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 1 Open issues
  • 4 Versions
  • 38 % Grown

The README.md

Yii2 DotEnv

Build Status Latest Stable Version Total Downloads Latest Unstable Version License, (*1)

PHP DotEnv for Yii2 framework., (*2)

Installation

The preferred way to install this extension is through composer., (*3)

Either run, (*4)

php composer.phar require --prefer-dist yiithings/yii2-dotenv "*"

or add, (*5)

"yiithings/yii2-dotenv": "*"

to the require section of your composer.json file., (*6)

Usage

Once the extension is installed, simply use it in your code by :, (*7)

[
    'db' => [
        'password' => env('DB_PASS'),
    ],
]

The env function will autoload .env file, it uses the following search mechanism:, (*8)

If there is a Yii class, then pass the alias @vendor or @app or @yii, Otherwise 
according to the project directory to determine.

But, if your application vendor directory is a symbol link and you no registered @vendor or @app alias before call env function, the project will not working. So you should set the @vendor alias before calling env function., (*9)

The Versions

03/04 2018

dev-master

9999999-dev

PHP DotEnv for Yii2 framework

  Sources   Download

MIT

The Requires

 

The Development Requires

extension yii2 dotenv

03/04 2018

1.0.2

1.0.2.0

PHP DotEnv for Yii2 framework

  Sources   Download

MIT

The Requires

 

The Development Requires

extension yii2 dotenv

22/01 2018

1.0.1

1.0.1.0

PHP DotEnv for Yii2 framework

  Sources   Download

MIT

The Requires

 

The Development Requires

extension yii2 dotenv

22/01 2018

1.0.0

1.0.0.0

PHP DotEnv for Yii2 framework

  Sources   Download

MIT

The Requires

 

The Development Requires

extension yii2 dotenv