class Illuminate / Support / Env
You're browsing the documentation for an upcoming version of Laravel. The documentation and features of this release are subject to change.

Env

Properties

protected static

$putenv bool

Indicates if the putenv adapter is enabled.

Default: true
protected static

$repository Dotenv\...\RepositoryInterface|null

The environment repository instance.

Default: null

Methods

public static

enablePutenv ( ) : void

Enable the putenv adapter.

public static

disablePutenv ( ) : void

Disable the putenv adapter.

public static

getRepository ( ) : Dotenv\...\RepositoryInterface

Get the environment repository instance.

public static

get ( $key , $default ) : mixed

Gets the value of an environment variable.

Parameters

  • $key string
  • $default mixed