Support the ongoing development of Laravel.io →
Installation Database
Last updated 2 years ago.
0

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

Last updated 9 years ago.
0

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?

0

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.

Last updated 9 years ago.
0

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.

0

Sign in to participate in this thread!

Eventy

Your banner here too?

dannyverp dannyverp Joined 16 Mar 2015

Moderators

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

Your logo here?

Laravel.io

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

© 2024 Laravel.io - All rights reserved.