I need to change the name of my database. I made the change in config/database.php. The name is now the name of my new database. However, my site is still referencing my old database.
Is there another file that references the database name that I'm forgetting?
Your .env file has a database field, might want to change it there aswell?
I just looked at the file. It's changed there as well.
So nowhere in either of these files is the old database even mentioned.
Anywhere else I can look?
If you're using php artisan serve
to serve up your local site, you need to restart it (hit CTRL+C or CMD+C) and run the command again. Otherwise, you can try running php artisan config:clear
to clear the configuration cache :)
Mocrosoft said:
Your .env file has a database field, might want to change it there aswell?
Hi all
Can anyone explain why we have to change it in the .env if we have already set it up in the config file? Would be great to get some background around this setup.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community