Laravel was displaying to me \"Access denied for user \'homestead\'@\'localhost\' (using password: YES)\". One solution for this was clearing the cache and the config cache
Calling
php artisan config:cache
before
php artisan cache:clear
fixed the issue.
Had the same problem on my vagrant/homestead VM. All the other things in this thread didn't help.
The solution was vagrant reload --provision
Can't this solve it?
$php artisan optimize:clear
Compiled views cleared!
Application cache cleared!
Route cache cleared!
Configuration cache cleared!
Compiled services and packages files removed!
I ran my project in a docker container, then later tried accessing it via laragon, I had similar issue, this was due to compiled configurations in /bootstrap/cache/config.php
.
I fixed fit by running php artisan config:clear
, this deletes the /bootstrap/cache/config.php
file automatically.
You should update the permission using the below command-/
sudo chown -R www-data:www-data ./storage
This will resolve your below issue
First try:
Check if there is a "data" folder inside "storage/framework/cache/". If there is not, then create it manually. (create a new folder with name "data")
Option 2:
If there is a "data" folder inside "storage/framework/cache/". Remove ALL existing folders inside there.
Then final, running this:
php artisan cache:clear
This should fix this issue: "Failed to clear cache. Make sure you have the appropriate permissions."