Created
May 19, 2014 01:43
-
-
Save ddonovan/ac3c45419517b657e13d to your computer and use it in GitHub Desktop.
Environment detection for larval app.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
|-------------------------------------------------------------------------- | |
| Detect The Application Environment | |
|-------------------------------------------------------------------------- | |
| | |
| Laravel takes a dead simple approach to your application environments | |
| so you can just specify a machine name for the host that matches a | |
| given environment, then we will automatically detect it for you. | |
| | |
*/ | |
/* | |
Rename LARAVEL_ENV to whatever name works for you. | |
*/ | |
$env = $app->detectEnvironment(function() | |
{ | |
return getenv('LARAVEL_ENV') ? : 'local'; | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// add this somewhere on your server configuration and reboot apache. I think you can add it in a few different places, I used the vhosts file. | |
<VirtualHost *:80> | |
SetEnv LARAVEL_ENV "production" | |
</VirtualHost> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment