Sounds like you are on a different env config file.
Try check what your existing environment with something like App::environment()
.
Also, maybe check this out too https://github.com/laravel/laravel/blob/master/.env.example
Thanks for the rapid reply! I did indeed find the configuration in the .env file! If I remove these .env files will it fall back to the defaults I assigned in the config/database.php file or wasn't that the idea?
You said you got a .env file there, so I assume you are using Laravel 5.0
If you install via composer, I believe a .env
file will be auto-created for you.
See: http://laravel.com/docs/5.0/configuration
I guess what you will see is something like this,
APP_ENV=local
APP_DEBUG=true
APP_KEY=D1AfhcEBCGCZz09HjIr5WBwZsLSwinoM
DB_HOST=localhost
DB_DATABASE=homestead
DB_USERNAME=homestead
DB_PASSWORD=secret
Try change DB_DATABASE
, DB_USERNAME
, DB_PASSWORD
to your credentials and see if it works.
on your config/database.php the values are defined as 'database' => env('DB_DATABASE', 'forge'), and so on.. means it will first take the value from the .env file on the root if not will take the optional value. as @awsp stated you need to update the .env file.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community