Permalink
Browse files

Allow environment to be checked via App::environment method.

  • Loading branch information...
taylorotwell committed Oct 19, 2013
1 parent e045886 commit 66e5a0b32f61b1ec0e14aa4bc4219d15c2a247c7
Showing with 12 additions and 3 deletions.
  1. +10 −2 src/Illuminate/Foundation/Application.php
  2. +2 −1 src/Illuminate/Foundation/changes.json
@@ -196,13 +196,21 @@ public function startExceptionHandling()
}
/**
* Get the current application environment.
* Get or check the current application environment.
*
* @param dynamic
* @return string
*/
public function environment()
{
return $this['env'];
if (count(func_get_args()) > 0)
{
return in_array($this['env'], func_get_args());
}
else
{
return $this['env'];
}
}
/**
@@ -59,6 +59,7 @@
{"message": "Allow Blade processing on echos to be escaped using the @ sign.", "backport": null},
{"message": "Allow custom messages to be registered when using Validator::extend.", "backport": null},
{"message": "Added new auth:clear-reminders command for clearing expired password reminders.", "backport": null},
{"message": "Added Cookie::queue method for creating cookies that are automatically attached to the final response.", "backport": null}
{"message": "Added Cookie::queue method for creating cookies that are automatically attached to the final response.", "backport": null},
{"message": "Allow environment to be checked via App::environment method.", "backport": null}
]
}

0 comments on commit 66e5a0b

Please sign in to comment.