I created a new Laravel project. When I go to the terminal to install the dependecies composer displays the following warning:
composer
Cannot create cache
When you installed composer pretty sure you used $ sudo command because of that the ~/.composer folder was created by the root.
$ sudo
~/.composer
Run this to fix the issue:
$ sudo chown -R $USER $HOME/.composer