EnvironmentDetector
class EnvironmentDetector (View source)
Methods
string | detect(array|string $environments, array|null $consoleArgs = null) Detect the application's current environment. | |
string | detectWebEnvironment(array|string $environments) Set the application environment for a web request. | |
string | detectConsoleEnvironment(mixed $environments, array $args) Set the application environment from command-line arguments. | |
string|null | getEnvironmentArgument(array $args) Get the environment argument from the console. | |
bool | isMachine(string $name) Determine if the name matches the machine name. |
Details
string detect(array|string $environments, array|null $consoleArgs = null)
Detect the application's current environment.
protected string detectWebEnvironment(array|string $environments)
Set the application environment for a web request.
protected string detectConsoleEnvironment(mixed $environments, array $args)
Set the application environment from command-line arguments.
protected string|null getEnvironmentArgument(array $args)
Get the environment argument from the console.
bool isMachine(string $name)
Determine if the name matches the machine name.
© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/4.2/Illuminate/Foundation/EnvironmentDetector.html