Enter Into The Laravel Project
The first thing that you have to do is to change the directory to the Laravel project and you can do that using the "cd" command like below.
Method 1: Change Directory Permission
Once you have entered the root directory now you can change the directory permission using the "chmod" command. For the code example below you can pass in the "-R" flag to make it recursive which means all subdirectories will have the same permission.
sudo chmod -R 755 storage/ sudo chmod -R 755 bootstrap/cache/
7 - Owner can write 7 - Group can write 5 - Others cannot write!
Method 2: Make use of the "clear" Command
Another possible way to fix this error is to make use of the "clear" command. These commands will clear the route, config as well as the cache.
php artisan route:clear php artisan config:clear php artisan cache:clear