Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why do I get a laravel error while creating a new project?

Tags:

php

laravel

When I type laravel new blog I get the following error.

In RequestException.php line 113:

Server error: GET http://cabinet.laravel.com/latest.zip resulted in a 522 Origin Connection Time-out response:

  <html>   <head><title>522 Origin Connection Time-out</title></head>   <body bgcolor="white">   <center><h1>522 Origin Conne (truncated...) 

Is the same error if I typ composer create-project --prefer-dist laravel/laravel blog.

And the link doesn't work if I try to go there.

like image 995
B.Simsek Avatar asked Nov 04 '20 18:11

B.Simsek


People also ask

Do I need to install PHP before Laravel?

Before creating your first Laravel project, you should ensure that your local machine has PHP and Composer installed.


2 Answers

Your Laravel installer is very out of date. The only way to get the latest version is to remove and install again:

composer global remove laravel/installer  composer global require laravel/installer 
like image 98
Altantur Avatar answered Nov 15 '22 23:11

Altantur


  1. You need to update the installer to the latest version.

laravel-news.com/updating-the-laravel-installer

composer global require "laravel/installer:^4.0" 
  1. after update you check your version using: laravel --version and you should get output like Laravel Installer 4.0.3
like image 24
B.Simsek Avatar answered Nov 15 '22 23:11

B.Simsek