After Upgrading Laravel 5.1 To 5.2 \App::environment() Always Returning "production"
I upgraded laravel 5.1 to 5.2, everything looks good. But when try to access the app environment not getting what expected.
When i dd($_ENV) this is what i get "APP_ENV" => "vagrant" "APP_DEBUG" => "true" "DB_HOST" => "localhost" But When dd(\App::environment()); "production" P.S. even I checked in tinker: dd(env('APP_ENV')) gives me "vagrant" but dd(\App::environment()) gives me "production". Dont you think it is odd :(
This is wierd :(
Anyone face this problem ??
you missed a step in the upgrade process:
Add an env configuration option to your app.php configuration file that looks like the following:
'env' => env('APP_ENV', 'production'),
P.S. You can check the value from the artisan command:
php artisan env
- → "failed to open stream" error when executing "migrate:make"
- → October CMS Plugin Routes.php not registering
- → OctoberCMS Migrate Table
- → OctoberCMS Rain User plugin not working or redirecting
- → October CMS Custom Mail Layout
- → October CMS - How to correctly route
- → October CMS - Conditionally Load a Different Page
- → Make a Laravel collection into angular array (octobercms)
- → In OctoberCMS how do you find the hint path?
- → How to register middlewares in OctoberCMS plugin?
- → Validating fileupload(image Dimensions) in Backend Octobercms
- → OctoberCMS Fileupload completely destroys my backend
- → How do I call the value from another backed page form and use it on a component in OctoberCms