Laravel showing “Failed to clear cache. Make sure you have the appropriate permissions”

后端 未结 12 2298
逝去的感伤
逝去的感伤 2020-12-10 00:58

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

12条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-10 01:25

    I had the same problem but noticed if you run php artisan config:clear it also by default runs cache:clear right after it so when you run it again there is not cache in it and gives that error. you only need to run php artisan config:clear. I am not sure why cache:clear fails when its ran alone but running the config:clear is a good alternative.

    Here is a helpful alias i use to clear everything in the app.

    laraclear='php artisan config:cache && php artisan config:clear && php artisan view:clear && php artisan route:clear && php artisan telescope:clear && php artisan debugbar:clear'
    

    Remove any unwanted commands that you do not use in it.

提交回复
热议问题