Hello guys. A quick laravel installation led me to a brick wall. My command was the normal new laravel application command
composer create-project --prefer-dist laravel/laravel myproject
i got the following error:
Cannot create cache directory /home/myHome/.composer/cache/repo/https---packagist.org/, or directory is not writable. Proceeding without cache.
The reason was that when I installed composer I used $ sudo command because of that the
~/.composer folder was created and owned by the root.
Run this to fix the issue:
$ sudo chown -R $USER $HOME/.composer
Then run the command and YES it runs smoothly.