I developed laravel app locally and uploaded in shared hosting.
While hosting I changed the database name and username of mysql in the .env and the config/database files.
But in remote its still using the old db name and user which is found in the bootstrap/cache/config file.
So how to clean the bootstrap/cache/config.php file?
The following is the syntax to clear cache in Laravel is given below: php artisan cache: clear. php artisan config: clear. php artisan cache: clear.
To clear all Laravel's cache, just run the following command: $ php artisan optimize:clear Compiled views cleared! Application cache cleared! Route cache cleared!
The cache configuration is located at config/cache. php . In this file you may specify which cache driver you would like used by default throughout your application. Laravel supports popular caching backends like Memcached and Redis out of the box.
If you are trying to clear configuration cache, which it sounds like you are. You need to run:
php artisan config:clear
At some point, you probably ran php artisan config:cache
which generated a cached version of your config file, and this file is not cleared with php artisan cache:clear
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With