I have installed Composer, Laravel, and PHP 7.1.22 with all extensions.
Now I try to create a new project using "laravel new projectname". It throws the exception below. How can I fix this problem?
[GuzzleHttp\Exception\ConnectException] cURL error 7: Failed to connect to localhost port 1080: Connection refused (see http://curl.haxx.se/libcurl/c/libcurl-errors.html)
You may turn off error details by setting the debug option in your app/config/app. php file to false .
Laravel can handle custom exceptions automatically when the exception is created in a certain way. First, the exception has to extend the Exception class and then, in case you want to render something to the end user, you have to override the render() function.
Throwable is the base interface for any object that can be thrown via a throw statement, including Error and Exception.
Try to remove ";" in extensions before the curl extension in your php.ini
file.
If the laravel
command fail you can try with composer create-project
:
composer create-project --prefer-dist laravel/laravel projectname
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With