Created
May 4, 2014 00:28
-
-
Save kirikintha/5ab893f7d26813f61354 to your computer and use it in GitHub Desktop.
Laravel Environment Detection For Mac
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. | |
| | |
*/ | |
$env = $app->detectEnvironment(array( | |
'local' => array('*.local'), | |
)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Laravel 4.1 changes how they do environment detection, so this is what worked on my mac.
I used gethostname() in PHP to figure this out.