Support the ongoing development of →
Installation Configuration
Last updated 10 months ago.

No one has run into this before? :(

Last updated 10 months ago.

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');

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?

Last updated 10 months ago.

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.

Last updated 10 months ago.

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:

Last updated 10 months ago.

Sign in to participate in this thread!

Full Stack Europe

Your banner here too?

TheMonk themonk Joined 5 Apr 2014


We'd like to thank these amazing companies for supporting us

Your logo here?

The Laravel portal for problem solving, knowledge sharing and community building.

© 2023 - All rights reserved.