Create project in Laravel in previous version

Asked

Viewed 3,284 times

0

When I create a project in Laravel this comes in version 5.5, however I am following a tutorial and error code to run.

I believe it is because the tutorial is used version 5.2 of Laravel.

I decided to create a project with version 5.2, reading this topic I came to this command:

composer create-project laravel/laravel apiLaravel "5.2"

And at first it seemed all right, until the Fatal error shown at the end.

D:\wamp64\www\laravel>composer create-project laravel/laravel apiLaravel "5.2"
Installing laravel/laravel (v5.2.0)
  - Installing laravel/laravel (v5.2.0): Downloading (100%)
Created project in apiLaravel
> php -r "copy('.env.example', '.env');"
> php artisan clear-compiled

Warning: require(D:\wamp64\www\laravel\apiLaravel\bootstrap/../vendor/autoload.p
hp): failed to open stream: No such file or directory in D:\wamp64\www\laravel\a
piLaravel\bootstrap\autoload.php on line 17

Fatal error: require(): Failed opening required 'D:\wamp64\www\laravel\apiLarave
l\bootstrap/../vendor/autoload.php' (include_path='.;C:\php\pear') in D:\wamp64\
www\laravel\apiLaravel\bootstrap\autoload.php on line 17
Script php artisan clear-compiled handling the pre-update-cmd event returned wit
h error code 255

Is there a configuration or something missing?

  • Looks like folder permission ...

  • @Virgilionovic ran cmd as administrator now and gave the same error

2 answers

3


Try to use this way:

composer create-project --prefer-dist laravel/laravel blog "5.2.*"

Method passed straight from the documentation of the Larable

2

I managed to solve by modifying the command:

composer create-project laravel/laravel apiLaravel "5.2"

for

composer create-project laravel/laravel apiLaravel "5.2.*"

Browser other questions tagged

You are not signed in. Login or sign up in order to post.