No one has run into this before? :(
Did some more digging, I'll keep posting in case this helps anyone else. I added the following to my EvironmentVariable.php file:
echo(is_array($environment) ? 'Array' : 'not an Array'); echo(gettype($environment));
Which is telling me the key value pair being sent over is a string, not an array. I'm running php 5.4.25. Any thoughts as to why this might be coming back as a string and not an array?
Ok I've found something more definitive. If I name my environment any name but "local" it works according to the docs. So for example if I call my development environment "development" instead of "local" the error goes away. Here's my revised environment setup:
$env = $app->detectEnvironment(array( 'development' => 'Monk', ));
If I change "development" to local the error comes back. I can only guess the term local is in conflict with some setting in Xampp. Anyhow I hope this helps someone else who reads this, it sure was a head scratcher.
I think your issue was that you had local capitalized in the first example. I seem to recall having a similar issue. In you're working example, the environment is lower -cased. Windows can be difficult with shell commands as it does not support bash out of the box which is why you have to use something like Cygwin.
Have you considered using Vagrant to setup local virtual mahcines? These are excellent for setting up a dev env that is exactly the same as your prod server. Plus, using Vagrant, you can put your VagrantFile config into git and you can re-build a full local env with a single command. It can be a little tricky at first, but it has great docs and is very powerful once in place.
Here's a good starter for setting up Vagrant with Laravel: https://github.com/bryannielsen/Laravel4-Vagrant
Sign in to participate in this thread!
We'd like to thank these amazing companies for supporting us
The Laravel portal for problem solving, knowledge sharing and community building.