I changed the database credentials from remote to local in .env
Everything works fine.
But then I changed the env variables again and try to config cache but got this error
Base table of view does not exist...
I tried to run the following commands
php artisan cache:clear
php artisan config:cache
But still instead of rewriting the cache, artisan was throwing the same error. It is trying to make db request by using old env variables. How do I fix this?
well the problem with the migrations is that they are not maintained by the original developers. So the database is cloned directly from server to localhost @marianomoreyra
As I have mentioned, the issue is it is trying to access oldBD.table, but I do not have that db in my server. I have my target database with other name and it has everything that is needed. I am trying to clear the cache so that the app can connect to the database of which credentials I have added in the env. @tray2
@gitwithravish looks like you can't cache because it's checking the old config, what you can do is delete the bootstrap/cache/config.php file manually.
@gitwithravish I think what happens is when you run php artisan config:clear it looks in the bootstrap/cache/config.php file if what cache driver you are using (file, redis, database) so it can delete the cache.
The problem is, looks like your old config is set to database, and looking for cache table which doesn't exist giving you base table error. Not 100% sure about this but that's what I thought when I suggest deleting the config file manually.