Published 1 week ago by AbdulBazith
Guys I worked with a project name PROJECT1 . I hosted it in an domain in Cpanel. For testing purpose I duplicated the project and renamed it as PROJECT2 in the same domain. Now I changed the DB_DATABASE,DB_USERNAME,DB_PASSWORD in the .env file in the PROJECT2. Now whats my problem is I changed the db name for PROJECT2 but it still works with the old DB. Still it fetched data from the old db how?
the PROJRCT1 is also in the same domain..
Whats the reason for this problem. Do I need to change any other file to change the DB.
Please suggest your ideas
artisan config:cache caches all files from /config into a single array that it stores. It then reads all config variables from that array and ignores anything in .env or the /config files until you recache them. That's why it still works after deleting .env.
don't have ssh access to your live server, you'd just need to delete the
bootstrap/cache/config.php file, which is the cache file