Skip to content

Instantly share code, notes, and snippets.

@mackstar
Created October 15, 2011 18:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mackstar/1289955 to your computer and use it in GitHub Desktop.
Save mackstar/1289955 to your computer and use it in GitHub Desktop.
Environment::is(function($request) {
$isLocal = $request->env('HTTP_HOST') == 'lithium.local';
if(preg_match('/^\/test/', $request->env('REQUEST_URI')) && $isLocal) {
return 'test';
}
if($isLocal) {
return 'development';
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment