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

EnvironmentDetector

Methods

public

detect ( Closure $callback , $consoleArgs ) : string

Detect the application's current environment.

Parameters

  • $callback Closure
  • $consoleArgs array|null
protected

detectWebEnvironment ( Closure $callback ) : string

Set the application environment for a web request.

Parameters

protected

detectConsoleEnvironment ( Closure $callback , array $args ) : string

Set the application environment from command-line arguments.

Parameters

protected

getEnvironmentArgument ( array $args ) : string|null

Get the environment argument from the console.

Parameters

  • $args array