The error be like:
[Composer\Downloader\TransportException]
The “http://repo.packagist.org/p/provider-2013%240078c6e2ea8258569f076a069de5636241177466c3ecf957b246601a3ea07bf7.j
son” file could not be downloaded: failed to open stream: A connection attempt failed because the connected party d
id not properly respond after a period of time, or established connection failed because connected host has failed
to respond. ————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————–
Solution
First download the composer by running
composer config -g repo.packagist composer https://repo.packagist.org
composer global require laravel/installer
Now, let’s create a new project by running below command
laravel new name_of_the_project
Also you can create laravel new project by composer
composer create-project --prefer-dist laravel/laravel name_of_the_project