Setting up default config loader event.
Went ahead and just register the config.load event with Laravel on every request and default to the file implementation. Signed-off-by: Taylor Otwell <taylorotwell@gmail.com>
This commit is contained in:
@@ -141,6 +141,27 @@ class Request {
|
||||
return defined('STDIN');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the Laravel environment for the current request.
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public static function env()
|
||||
{
|
||||
if (isset($_SERVER['LARAVEL_ENV'])) return $_SERVER['LARAVEL_ENV'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine the current request environment.
|
||||
*
|
||||
* @param string $env
|
||||
* @return bool
|
||||
*/
|
||||
public static function is_env($env)
|
||||
{
|
||||
return static::env() === $env;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the main route handling the request.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user