Laravel is awesome php framework no doubt on that, but like any other frameworks it has bugs and issues and that's exactly why it get updates.
Today I will point to two common issues in laravel and how to solve them (if you have other issues and solutions comment it below and i'll update this post)
1. Failed to clear cache. Make sure you have the appropriate permissions.
This error happens when you try to run
php artisan cach:clearor
php artisan cache:clear.
create data folder in
SQLSTATE[HY000]  Access denied for user 'username'@'localhost' (using password: NO) (SQL: select * from information_schema.tables where table_schema = root and table_name = migrations)
This happens when you try to run
php artisan migratecommand.
1. clear config caches
php artisan cach:clear(if doesn't work use no.2)
2. delete cache files from
bootstrap/cachefolder (if doesn't work use no.3)
3. restart your server
Note: Must of the times it is not really issue with your caching or database even laravel, it's simply you to make mistake in providing database information in
#wrong DB_CONNECTION=mysql DB_HOST=127.0.0.1 DB_PORT=3306 DB_DATABASE=root DB_USERNAME=blog DB_PASSWORD= # Correct DB_CONNECTION=mysql DB_HOST=127.0.0.1 DB_PORT=3306 DB_DATABASE=blog DB_USERNAME=root DB_PASSWORD=
must of the times this error caused because we provide
database_namewrong. (I suggest you double check your .env file before moving forward).
If you have any other issues and the solution share with us in comments below and I'll update this list.