Failed to create laravel project solution(100% working)

The error be like:

The “
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. ————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————–


First download the composer by running

composer config -g repo.packagist composer
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